pub trait DataReaderListener: Send + Sync {
// Provided methods
fn on_data_available(&self, _reader: InstanceHandle) { ... }
fn on_sample_lost(&self, _reader: InstanceHandle, _status: SampleLostStatus) { ... }
fn on_sample_rejected(
&self,
_reader: InstanceHandle,
_status: SampleRejectedStatus,
) { ... }
fn on_requested_deadline_missed(
&self,
_reader: InstanceHandle,
_status: RequestedDeadlineMissedStatus,
) { ... }
fn on_requested_incompatible_qos(
&self,
_reader: InstanceHandle,
_status: RequestedIncompatibleQosStatus,
) { ... }
fn on_liveliness_changed(
&self,
_reader: InstanceHandle,
_status: LivelinessChangedStatus,
) { ... }
fn on_subscription_matched(
&self,
_reader: InstanceHandle,
_status: SubscriptionMatchedStatus,
) { ... }
}Expand description
DataReaderListener — Spec §2.2.2.5.7 + §2.2.4.2.6.
7 reader-specific callbacks (the eighth, on_data_on_readers,
belongs to the SubscriberListener).
Provided Methods§
Sourcefn on_data_available(&self, _reader: InstanceHandle)
fn on_data_available(&self, _reader: InstanceHandle)
Spec §2.2.4.2.6.1 — new data has arrived at the reader.
Sourcefn on_sample_lost(&self, _reader: InstanceHandle, _status: SampleLostStatus)
fn on_sample_lost(&self, _reader: InstanceHandle, _status: SampleLostStatus)
Spec §2.2.4.2.6.2 — a sample was never received (e.g. overwritten by a newer one).
Sourcefn on_sample_rejected(
&self,
_reader: InstanceHandle,
_status: SampleRejectedStatus,
)
fn on_sample_rejected( &self, _reader: InstanceHandle, _status: SampleRejectedStatus, )
Spec §2.2.4.2.6.3 — a sample was rejected (RESOURCE_LIMITS).
Sourcefn on_requested_deadline_missed(
&self,
_reader: InstanceHandle,
_status: RequestedDeadlineMissedStatus,
)
fn on_requested_deadline_missed( &self, _reader: InstanceHandle, _status: RequestedDeadlineMissedStatus, )
Spec §2.2.4.2.6.4 — the reader did not receive a sample within the requested DEADLINE.
Sourcefn on_requested_incompatible_qos(
&self,
_reader: InstanceHandle,
_status: RequestedIncompatibleQosStatus,
)
fn on_requested_incompatible_qos( &self, _reader: InstanceHandle, _status: RequestedIncompatibleQosStatus, )
Spec §2.2.4.2.6.5 — a matched writer has incompatible offered QoS.
Sourcefn on_liveliness_changed(
&self,
_reader: InstanceHandle,
_status: LivelinessChangedStatus,
)
fn on_liveliness_changed( &self, _reader: InstanceHandle, _status: LivelinessChangedStatus, )
Spec §2.2.4.2.6.6 — the liveliness status of the matched writers has changed.
Sourcefn on_subscription_matched(
&self,
_reader: InstanceHandle,
_status: SubscriptionMatchedStatus,
)
fn on_subscription_matched( &self, _reader: InstanceHandle, _status: SubscriptionMatchedStatus, )
Spec §2.2.4.2.6.7 — a new compatible writer matched (or went away).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".