Skip to main content

rmw_session_property_t

Struct rmw_session_property_t 

Source
#[repr(C)]
pub struct rmw_session_property_t { pub key: *const c_char, pub value: *const c_char, }
Expand description

Publisher creation options — the home for publisher-side transport hints (upstream: rmw_publisher_options_t). Passed as a NULLable trailing param to create_publisher; NULL = all defaults. / /** Session creation options — the home for init-time context that create_session’s flat argument list cannot grow without another ABI break (issue 0808). Passed as a NULLable trailing param; NULL = all defaults.

The carrier question 0808 opened had two candidates: encode this behind the locator string, or take one options struct. The struct wins on precedent — rmw_publisher_options_t and rmw_subscription_options_t already solved exactly this problem for entities, with the same NULLable-trailing-param shape — and on cost: parsing config out of a locator means every backend reimplements a parser, which is code size on a target plus a new class of silent misparse. One break, then the struct grows.

Of Humble’s eight rmw_init_options_t fields this carries the two that were GAPS (issue 0785). domain_id stays a named argument because every backend needs it; security_options remains declined on the target (a DDS-SROS2 keystore path, and there is neither a filesystem nor a security plugin where this ABI runs); allocator, instance_id, impl and implementation_identifier are answered elsewhere or declined ABI-wide. / /** One backend-specific session configuration property.

The counterpart of RmwConfig::properties on the Rust side, which every backend already accepts and which — until phase-206 W3 — NO non-Rust caller could reach: the cffi adapter built properties: &[] and threw the options pointer away, so a C or C++ entry could state no transport configuration at all, on any platform.

Backend-specific by design. For zenoh this is zenoh-pico’s run-time option set — zp_config_insert(config, Z_CONFIG_<X>_KEY, value), which upstream calls “the primary configuration method” and which has no file format for the pico client — with the accepted names derived from zenoh-pico’s own config.h (zpico_config_keys.h). A backend that does not recognise a name MUST fail the session rather than drop it: a silently ignored configuration line is indistinguishable from one that took effect.

Both strings are NUL-terminated and BORROWED for the duration of the create_session call.

Fields§

§key: *const c_char

< Property name; never NULL.

§value: *const c_char

< Property value; never NULL.

Trait Implementations§

Source§

impl Clone for rmw_session_property_t

Source§

fn clone(&self) -> rmw_session_property_t

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for rmw_session_property_t

Source§

impl Debug for rmw_session_property_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.