#[repr(C)]pub struct HddsReaderListener {
pub on_data_available: HddsOnDataAvailable,
pub on_subscription_matched: HddsOnSubscriptionMatched,
pub on_liveliness_changed: HddsOnLivelinessChanged,
pub on_sample_lost: HddsOnSampleLost,
pub on_sample_rejected: HddsOnSampleRejected,
pub on_deadline_missed: HddsOnDeadlineMissed,
pub on_incompatible_qos: HddsOnIncompatibleQos,
pub user_data: *mut c_void,
}Expand description
C-compatible DataReader listener.
Set callback fields to receive events. Any callback set to None (NULL)
will be silently ignored. The user_data pointer is passed through to
every callback invocation.
§Example (C)
HddsReaderListener listener = {0};
listener.on_data_available = my_data_callback;
listener.on_subscription_matched = my_match_callback;
listener.user_data = my_context;
hdds_reader_set_listener(reader, &listener);Fields§
§on_data_available: HddsOnDataAvailableCalled when new data is available to read.
on_subscription_matched: HddsOnSubscriptionMatchedCalled when the reader matches/unmatches with a writer.
on_liveliness_changed: HddsOnLivelinessChangedCalled when liveliness of a matched writer changes.
on_sample_lost: HddsOnSampleLostCalled when samples are lost (gap in sequence numbers).
on_sample_rejected: HddsOnSampleRejectedCalled when samples are rejected due to resource limits.
on_deadline_missed: HddsOnDeadlineMissedCalled when the requested deadline is missed.
on_incompatible_qos: HddsOnIncompatibleQosCalled when QoS is incompatible with a matched writer.
user_data: *mut c_voidUser-provided context pointer, passed to all callbacks.
Trait Implementations§
impl Send for HddsReaderListener
impl Sync for HddsReaderListener
Auto Trait Implementations§
impl Freeze for HddsReaderListener
impl RefUnwindSafe for HddsReaderListener
impl Unpin for HddsReaderListener
impl UnsafeUnpin for HddsReaderListener
impl UnwindSafe for HddsReaderListener
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