Skip to main content

CffiPublisher

Struct CffiPublisher 

Source
pub struct CffiPublisher { /* private fields */ }
Expand description

Publisher backed by a C vtable.

Implementations§

Source§

impl CffiPublisher

Source

pub fn topic_name(&self) -> &str

Topic name. Result is the null-terminated string written at publisher creation; never re-resolved from the backend.

Source

pub fn type_name(&self) -> &str

Fully-qualified type name ("std_msgs/msg/Int32").

Source

pub fn qos(&self) -> NrosRmwQos

QoS used to create this publisher.

Source

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

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Publisher for CffiPublisher

Source§

type Error = TransportError

Error type for publish operations
Source§

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>

Phase 124.E.1 — streamed publish. Read more
Source§

fn buffer_error(&self) -> TransportError

Return a buffer-too-small error (implementation specific)
Source§

fn serialization_error(&self) -> TransportError

Return a serialization error (implementation specific)
Source§

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>

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 more
Source§

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>

Phase 128.F.4 — publish with an opaque attachment block. Read more
Source§

fn publish<M>(&self, msg: &M, buf: &mut [u8]) -> Result<(), Self::Error>
where M: RosMessage,

Publish a typed message (serializes automatically)
Source§

fn supports_event(&self, _kind: EventKind) -> bool

Phase 108 — true if the backend can generate this event for this publisher. Default returns false; backends override per supported event kind. 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> 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, 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.