#[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: usizeTrait Implementations§
Source§impl Clone for rmw_byte_span_t
impl Clone for rmw_byte_span_t
Source§fn clone(&self) -> rmw_byte_span_t
fn clone(&self) -> rmw_byte_span_t
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more