pub struct CffiSubscriber { /* private fields */ }Expand description
Subscriber backed by a C vtable.
Implementations§
Source§impl CffiSubscriber
impl CffiSubscriber
pub fn topic_name(&self) -> &str
pub fn type_name(&self) -> &str
pub fn qos(&self) -> NrosRmwQos
Sourcepub fn can_loan_messages(&self) -> bool
pub fn can_loan_messages(&self) -> bool
true iff the backend exposes the receive loan primitive
(Phase 99).
Trait Implementations§
Source§impl Drop for CffiSubscriber
impl Drop for CffiSubscriber
Source§impl Subscriber for CffiSubscriber
impl Subscriber for CffiSubscriber
Source§type Error = TransportError
type Error = TransportError
Error type for receive operations
Source§fn supports_process_in_place(&self) -> bool
fn supports_process_in_place(&self) -> bool
Whether this backend implements the in-place dispatch methods
(
process_raw_in_place /
process_raw_in_place_with_info)
with a real zero-copy borrow. Read moreSource§fn process_raw_in_place(
&mut self,
f: impl FnOnce(&[u8]),
) -> Result<bool, Self::Error>
fn process_raw_in_place( &mut self, f: impl FnOnce(&[u8]), ) -> Result<bool, Self::Error>
Process the received message in-place without copying. Read more
Source§fn try_recv_raw(
&mut self,
buf: &mut [u8],
) -> Result<Option<usize>, TransportError>
fn try_recv_raw( &mut self, buf: &mut [u8], ) -> Result<Option<usize>, TransportError>
Try to receive one message into
buf. Read moreSource§fn try_recv_raw_with_info(
&mut self,
buf: &mut [u8],
) -> Result<Option<(usize, Option<MessageInfo>)>, TransportError>
fn try_recv_raw_with_info( &mut self, buf: &mut [u8], ) -> Result<Option<(usize, Option<MessageInfo>)>, TransportError>
Try to receive raw data along with publisher metadata. Read more
Source§fn try_recv_sequence(
&mut self,
buf: &mut [u8],
per_msg_cap: usize,
max_msgs: usize,
out_lens: &mut [usize],
) -> Result<usize, TransportError>
fn try_recv_sequence( &mut self, buf: &mut [u8], per_msg_cap: usize, max_msgs: usize, out_lens: &mut [usize], ) -> Result<usize, TransportError>
Phase 124.D.1 — burst-take. Read more
Source§fn deserialization_error(&self) -> TransportError
fn deserialization_error(&self) -> TransportError
Return a deserialization error (implementation specific)
Source§fn unsupported_event_error(&self) -> TransportError
fn unsupported_event_error(&self) -> TransportError
Phase 108 — backend’s error variant for “this event kind is
not supported.” Default reuses
deserialization_error() for
backends that don’t have a distinct Unsupported mapping.Source§unsafe fn register_event_callback(
&mut self,
kind: EventKind,
deadline_ms: u32,
cb: EventCallback,
user_ctx: *mut c_void,
) -> Result<(), TransportError>
unsafe fn register_event_callback( &mut self, kind: EventKind, deadline_ms: u32, cb: EventCallback, user_ctx: *mut c_void, ) -> Result<(), TransportError>
Phase 108 — register a callback fired when the named status
event occurs.
deadline_ms applies to
EventKind::RequestedDeadlineMissed only; ignored otherwise.
Default impl returns the backend’s “unsupported”-shaped error. Read moreSource§fn try_recv_raw_with_attachment(
&mut self,
buf: &mut [u8],
_att_buf: &mut [u8],
) -> Result<Option<(usize, usize)>, Self::Error>
fn try_recv_raw_with_attachment( &mut self, buf: &mut [u8], _att_buf: &mut [u8], ) -> Result<Option<(usize, usize)>, Self::Error>
Phase 128.F.4 — receive with attachment bytes alongside the
payload. Read more
Source§fn try_recv<M>(&mut self, buf: &mut [u8]) -> Result<Option<M>, Self::Error>where
M: RosMessage,
fn try_recv<M>(&mut self, buf: &mut [u8]) -> Result<Option<M>, Self::Error>where
M: RosMessage,
Try to receive a typed message (non-blocking)
Source§fn process_raw_in_place_with_info(
&mut self,
f: impl FnOnce(&[u8], Option<MessageInfo>),
) -> Result<bool, Self::Error>
fn process_raw_in_place_with_info( &mut self, f: impl FnOnce(&[u8], Option<MessageInfo>), ) -> Result<bool, Self::Error>
In-place processing variant that also surfaces publisher metadata. Read more
Source§fn register_waker(&self, _waker: &Waker)
fn register_waker(&self, _waker: &Waker)
Register an async waker to be notified when data arrives. Read more
Auto Trait Implementations§
impl Freeze for CffiSubscriber
impl RefUnwindSafe for CffiSubscriber
impl !Send for CffiSubscriber
impl !Sync for CffiSubscriber
impl Unpin for CffiSubscriber
impl UnsafeUnpin for CffiSubscriber
impl UnwindSafe for CffiSubscriber
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more