pub struct CallerInbox { /* private fields */ }Expand description
The header a caller hands the backend: a ring’s geometry and where its bytes are.
#[repr(C)] and four plain words, because this is the shape an ABI slot
has to carry. The road from nros-node to the zenoh shim runs through
nros-rmw-cffi’s C vtable (packages/core/nros-rmw-abi/include/nros/),
which today has no create_service variant that takes one; until it does,
crate::Session::SUPPORTS_CALLER_INBOX is false on every backend the
runtime can reach and a family’s ServiceInboxSpec resolves to
ServiceInboxSpec::Backend. Laying this out as an ABI struct now is what
keeps that a forwarding problem rather than a redesign.
Implementations§
Source§impl CallerInbox
impl CallerInbox
Sourcepub const fn over<const S: usize, const D: usize>(
storage: &'static CallerInboxStorage<S, D>,
) -> Self
pub const fn over<const S: usize, const D: usize>( storage: &'static CallerInboxStorage<S, D>, ) -> Self
A header over storage the caller owns for the life of the program.
const, so a family writes
static INBOX: CallerInbox = CallerInbox::over(&STORAGE); and hands
the reference to ServiceInboxSpec::Caller.
Sourcepub const fn slot_bytes(&self) -> usize
pub const fn slot_bytes(&self) -> usize
Bytes one request slot holds.
Sourcepub const fn storage_bytes(&self) -> usize
pub const fn storage_bytes(&self) -> usize
Bytes this ring’s storage occupies (slots and entries).
Trait Implementations§
Source§impl Clone for CallerInbox
impl Clone for CallerInbox
Source§fn clone(&self) -> CallerInbox
fn clone(&self) -> CallerInbox
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more