pub struct CffiPublisher { /* private fields */ }Expand description
Publisher backed by a C vtable.
Implementations§
Source§impl CffiPublisher
impl CffiPublisher
Sourcepub fn topic_name(&self) -> &str
pub fn topic_name(&self) -> &str
Topic name. Result is the null-terminated string written at publisher creation; never re-resolved from the backend.
Sourcepub fn qos(&self) -> NrosRmwQos
pub fn qos(&self) -> NrosRmwQos
QoS used to create this publisher.
Sourcepub fn can_loan_messages(&self) -> bool
pub fn can_loan_messages(&self) -> bool
true iff the backend exposes the publish loan primitive
(Phase 99). Mirrors upstream rmw_publisher_t::can_loan_messages.
Trait Implementations§
Source§impl Drop for CffiPublisher
impl Drop for CffiPublisher
Source§impl Publisher for CffiPublisher
impl Publisher for CffiPublisher
Source§type Error = TransportError
type Error = TransportError
Error type for publish operations
Source§fn publish_raw(&self, data: &[u8]) -> Result<(), TransportError>
fn publish_raw(&self, data: &[u8]) -> Result<(), TransportError>
Publish a CDR-serialised message. Read more
Source§unsafe fn publish_streamed(
&self,
size_cb: unsafe extern "C" fn(out_total_len: *mut usize, user_ctx: *mut c_void),
chunk_cb: unsafe extern "C" fn(out_buf: *mut u8, cap: usize, out_written: *mut usize, user_ctx: *mut c_void),
user_ctx: *mut c_void,
) -> Result<(), TransportError>
unsafe fn publish_streamed( &self, size_cb: unsafe extern "C" fn(out_total_len: *mut usize, user_ctx: *mut c_void), chunk_cb: unsafe extern "C" fn(out_buf: *mut u8, cap: usize, out_written: *mut usize, user_ctx: *mut c_void), user_ctx: *mut c_void, ) -> Result<(), TransportError>
Phase 124.E.1 — streamed publish. Read more
Source§fn buffer_error(&self) -> TransportError
fn buffer_error(&self) -> TransportError
Return a buffer-too-small error (implementation specific)
Source§fn serialization_error(&self) -> TransportError
fn serialization_error(&self) -> TransportError
Return a serialization 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 impl reuses
serialization_error()
since most backends share an Unsupported variant; backends
override if they 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::OfferedDeadlineMissed only; ignored otherwise.
Default impl returns the backend’s “unsupported”-shaped error. Read moreSource§fn assert_liveliness(&self) -> Result<(), TransportError>
fn assert_liveliness(&self) -> Result<(), TransportError>
Phase 109 — assert this publisher’s liveliness manually.
Required for publishers configured with
QosLivelinessPolicy::ManualByTopic. No-op for other
liveliness kinds. Default impl returns Ok(()) (no-op);
backends override when they implement manual liveliness.Source§fn publish_raw_with_attachment(
&self,
data: &[u8],
_attachment: &[u8],
) -> Result<(), Self::Error>
fn publish_raw_with_attachment( &self, data: &[u8], _attachment: &[u8], ) -> Result<(), Self::Error>
Phase 128.F.4 — publish with an opaque attachment block. Read more
Auto Trait Implementations§
impl Freeze for CffiPublisher
impl RefUnwindSafe for CffiPublisher
impl !Send for CffiPublisher
impl !Sync for CffiPublisher
impl Unpin for CffiPublisher
impl UnsafeUnpin for CffiPublisher
impl UnwindSafe for CffiPublisher
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