[−][src]Struct rustdds::dds::With_Key_DataReader
Implementations
impl<'a, D: 'static, DA> DataReader<'a, D, DA> where
D: DeserializeOwned + Keyed,
<D as Keyed>::K: Key,
DA: DeserializerAdapter<D>, [src]
D: DeserializeOwned + Keyed,
<D as Keyed>::K: Key,
DA: DeserializerAdapter<D>,
pub fn read(
&mut self,
max_samples: usize,
read_condition: ReadCondition
) -> Result<Vec<DataSample<&D>>>[src]
&mut self,
max_samples: usize,
read_condition: ReadCondition
) -> Result<Vec<DataSample<&D>>>
pub fn take(
&mut self,
max_samples: usize,
read_condition: ReadCondition
) -> Result<Vec<DataSample<D>>>[src]
&mut self,
max_samples: usize,
read_condition: ReadCondition
) -> Result<Vec<DataSample<D>>>
pub fn read_next_sample(&mut self) -> Result<Option<DataSample<&D>>>[src]
pub fn take_next_sample(&mut self) -> Result<Option<DataSample<D>>>[src]
pub fn iterator(&mut self) -> Result<impl Iterator<Item = Result<&D, D::K>>>[src]
Produces an interator over the currently available NOT_READ samples.
Yields only payload data, not SampleInfo metadata
This is not called iter() because it takes a mutable reference to self.
pub fn conditional_iterator(
&mut self,
read_condition: ReadCondition
) -> Result<impl Iterator<Item = Result<&D, D::K>>>[src]
&mut self,
read_condition: ReadCondition
) -> Result<impl Iterator<Item = Result<&D, D::K>>>
Produces an interator over the samples filtered b ygiven condition. Yields only payload data, not SampleInfo metadata
pub fn into_iterator(&mut self) -> Result<impl Iterator<Item = Result<D, D::K>>>[src]
Produces an interator over the currently available NOT_READ samples.
Yields only payload data, not SampleInfo metadata
Removes samples from DataReader.
Note! If the iterator is only partially consumed, all the samples it could have provided
are still removed from the Datareader.
pub fn into_conditional_iterator(
&mut self,
read_condition: ReadCondition
) -> Result<impl Iterator<Item = Result<D, D::K>>>[src]
&mut self,
read_condition: ReadCondition
) -> Result<impl Iterator<Item = Result<D, D::K>>>
Produces an interator over the samples filtered b ygiven condition.
Yields only payload data, not SampleInfo metadata
Note! If the iterator is only partially consumed, all the samples it could have provided
are still removed from the Datareader.
pub fn read_instance(
&mut self,
max_samples: usize,
read_condition: ReadCondition,
instance_key: Option<<D as Keyed>::K>,
this_or_next: SelectByKey
) -> Result<Vec<DataSample<&D>>>[src]
&mut self,
max_samples: usize,
read_condition: ReadCondition,
instance_key: Option<<D as Keyed>::K>,
this_or_next: SelectByKey
) -> Result<Vec<DataSample<&D>>>
Works similarly to read(), but will return only samples from a specific instance. The instance is specified by an optional key. In case the key is not specified, the smallest (in key order) instance is selected. If a key is specified, then the parameter this_or_next specifies whether to access the instance with specified key or the following one, in key order.
This should cover DDS DataReader methods read_instance, read_next_instance, read_next_instance_w_condition.
pub fn take_instance(
&mut self,
max_samples: usize,
read_condition: ReadCondition,
instance_key: Option<<D as Keyed>::K>,
this_or_next: SelectByKey
) -> Result<Vec<DataSample<D>>>[src]
&mut self,
max_samples: usize,
read_condition: ReadCondition,
instance_key: Option<<D as Keyed>::K>,
this_or_next: SelectByKey
) -> Result<Vec<DataSample<D>>>
Similar to read_instance, but will return owned datasamples This should cover DDS DataReader methods take_instance, take_next_instance, take_next_instance_w_condition.
pub fn get_requested_deadline_missed_status(
&mut self
) -> Result<Option<RequestedDeadlineMissedStatus>>[src]
&mut self
) -> Result<Option<RequestedDeadlineMissedStatus>>
Trait Implementations
impl<'a, D, DA> Drop for DataReader<'a, D, DA> where
D: Keyed + DeserializeOwned,
DA: DeserializerAdapter<D>, [src]
D: Keyed + DeserializeOwned,
DA: DeserializerAdapter<D>,
impl<'a, D, DA> Entity for DataReader<'a, D, DA> where
D: Keyed + DeserializeOwned,
DA: DeserializerAdapter<D>, [src]
D: Keyed + DeserializeOwned,
DA: DeserializerAdapter<D>,
fn as_entity(&self) -> &EntityAttributes[src]
fn get_guid(&self) -> GUID[src]
fn get_entity_id(&self) -> EntityId[src]
fn get_guid_prefix(&self) -> GuidPrefix[src]
impl<'a, D, DA> Evented for DataReader<'a, D, DA> where
D: Keyed + DeserializeOwned,
DA: DeserializerAdapter<D>, [src]
D: Keyed + DeserializeOwned,
DA: DeserializerAdapter<D>,
fn register(
&self,
poll: &Poll,
token: Token,
interest: Ready,
opts: PollOpt
) -> Result<()>[src]
&self,
poll: &Poll,
token: Token,
interest: Ready,
opts: PollOpt
) -> Result<()>
fn reregister(
&self,
poll: &Poll,
token: Token,
interest: Ready,
opts: PollOpt
) -> Result<()>[src]
&self,
poll: &Poll,
token: Token,
interest: Ready,
opts: PollOpt
) -> Result<()>
fn deregister(&self, poll: &Poll) -> Result<()>[src]
impl<D, DA, '_> HasQoSPolicy for DataReader<'_, D, DA> where
D: Keyed + DeserializeOwned,
DA: DeserializerAdapter<D>, [src]
D: Keyed + DeserializeOwned,
DA: DeserializerAdapter<D>,
fn set_qos(&mut self, policy: &QosPolicies) -> Result<()>[src]
fn get_qos(&self) -> &QosPolicies[src]
Auto Trait Implementations
impl<'a, D, DA = CDRDeserializerAdapter<D>> !RefUnwindSafe for DataReader<'a, D, DA>
impl<'a, D, DA = CDRDeserializerAdapter<D>> !Send for DataReader<'a, D, DA>
impl<'a, D, DA = CDRDeserializerAdapter<D>> !Sync for DataReader<'a, D, DA>
impl<'a, D, DA> Unpin for DataReader<'a, D, DA> where
D: Unpin,
DA: Unpin,
<D as Keyed>::K: Unpin,
D: Unpin,
DA: Unpin,
<D as Keyed>::K: Unpin,
impl<'a, D, DA = CDRDeserializerAdapter<D>> !UnwindSafe for DataReader<'a, D, DA>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,