Skip to main content

rmw_byte_span_t

Struct rmw_byte_span_t 

Source
#[repr(C)]
pub struct rmw_byte_span_t { pub data: *const u8, pub len: usize, }
Expand description

Global identifier for a publisher — upstream rmw_gid_t, field for field.

Phase 376 W4. Mirrors upstream exactly, including the 24-byte width and the implementation_identifier. The identifier matters MORE here than upstream: nros_rmw_cffi_register_named admits several backends in one image, so two gids are comparable only when it matches.

Comparison is over the whole array, so a producer MUST zero-pad an identifier shorter than 24 bytes rather than leave the tail undefined — otherwise two gids naming the same entity compare unequal on stack garbage.

24, not 16, and that is a discrepancy worth knowing about. Our own MessageInfo::publisher_gid (nros-core, PUBLISHER_GID_SIZE) is 16 bytes, while the Cyclone backend already computes 24-byte gids for the DDS graph (entity_gid_24 in graph.cpp). Under upstream semantics those are the SAME identifier, so a gid obtained from a take cannot today be compared with one from get_gid_for_publisher without a documented mapping — and the narrower one truncates. The ABI takes upstream’s width; reconciling MessageInfo is its own change and is NOT done here. / /* Bytes to READ — phase-406 W2.

len is a FACT: how many bytes exist. Nothing is written through this, and const says so — publish handing a backend a mutable pointer is an invitation.

PASSED BY VALUE. Two words, and there is nothing to report back.

Fields§

§data: *const u8§len: usize

Trait Implementations§

Source§

impl Clone for rmw_byte_span_t

Source§

fn clone(&self) -> rmw_byte_span_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_byte_span_t

Source§

impl Debug for rmw_byte_span_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.