[][src]Struct rustdds::dds::With_Key_DataReader

pub struct With_Key_DataReader<'a, D: Keyed + DeserializeOwned, DA: DeserializerAdapter<D> = CDRDeserializerAdapter<D>> { /* fields omitted */ }

Implementations

impl<'a, D: 'static, DA> DataReader<'a, D, DA> where
    D: DeserializeOwned + Keyed,
    <D as Keyed>::K: Key,
    DA: DeserializerAdapter<D>, 
[src]

pub fn read(
    &mut self,
    max_samples: usize,
    read_condition: ReadCondition
) -> Result<Vec<DataSample<&D>>>
[src]

pub fn take(
    &mut self,
    max_samples: usize,
    read_condition: ReadCondition
) -> Result<Vec<DataSample<D>>>
[src]

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]

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]

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]

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]

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]

Trait Implementations

impl<'a, D, DA> Drop for DataReader<'a, D, DA> where
    D: Keyed + DeserializeOwned,
    DA: DeserializerAdapter<D>, 
[src]

impl<'a, D, DA> Entity for DataReader<'a, D, DA> where
    D: Keyed + DeserializeOwned,
    DA: DeserializerAdapter<D>, 
[src]

impl<'a, D, DA> Evented for DataReader<'a, D, DA> where
    D: Keyed + DeserializeOwned,
    DA: DeserializerAdapter<D>, 
[src]

impl<D, DA, '_> HasQoSPolicy for DataReader<'_, D, DA> where
    D: Keyed + DeserializeOwned,
    DA: DeserializerAdapter<D>, 
[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

impl<'a, D, DA = CDRDeserializerAdapter<D>> !UnwindSafe for DataReader<'a, D, DA>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,