Skip to main content

DataReader

Trait DataReader 

Source
pub trait DataReader: Send + Sync {
    // Required methods
    fn take(&self) -> Result<Vec<ReceivedSample>>;
    fn read(&self) -> Result<Vec<ReceivedSample>>;
    fn topic(&self) -> &str;
    fn type_name(&self) -> &str;
}
Expand description

Abstract data reader interface

Required Methods§

Source

fn take(&self) -> Result<Vec<ReceivedSample>>

Take all available samples (removes from reader cache)

Source

fn read(&self) -> Result<Vec<ReceivedSample>>

Read samples without removing from cache

Source

fn topic(&self) -> &str

Get topic name

Source

fn type_name(&self) -> &str

Get type name

Implementors§