Struct drmem_api::client::RequestChan
source · pub struct RequestChan { /* private fields */ }
Expand description
A handle which is used to communicate with the core of DrMem. Clients will be given a handle to be used throughout its life.
This type wraps the mpsc::Sender<>
and defines a set of helper
methods to send requests and receive replies with the core.
Implementations§
source§impl RequestChan
impl RequestChan
pub fn new(req_chan: Sender<Request>) -> Self
pub async fn monitor_device(&self, name: Name) -> Result<DataStream<Reading>>
pub async fn set_device<T: Into<Value> + TryFrom<Value, Error = Error>>(
&self,
name: Name,
value: T
) -> Result<T>
pub async fn get_device_info(
&self,
pattern: Option<String>
) -> Result<Vec<DevInfoReply>>
Trait Implementations§
source§impl Clone for RequestChan
impl Clone for RequestChan
source§fn clone(&self) -> RequestChan
fn clone(&self) -> RequestChan
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more