Trait mbus_api::ApiNoContext[][src]

pub trait ApiNoContext<C: Send + Sync> {
    fn poll_ready(
        &self,
        _cx: &mut Context<'_>
    ) -> Poll<Result<(), Box<dyn Error + Send + Sync + 'static>>>;
fn context(&self) -> &C;
#[must_use] fn get<'life0, 'async_trait>(
        &'life0 self,
        device: String,
        baudrate: Baudrate,
        address: String
    ) -> Pin<Box<dyn Future<Output = Result<GetResponse, ApiError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_multi<'life0, 'async_trait>(
        &'life0 self,
        device: String,
        baudrate: Baudrate,
        address: String,
        maxframes: i32
    ) -> Pin<Box<dyn Future<Output = Result<GetMultiResponse, ApiError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn hat<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<HatResponse, ApiError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn hat_off<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<HatOffResponse, ApiError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn hat_on<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<HatOnResponse, ApiError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn mbus_api<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<MbusApiResponse, ApiError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn scan<'life0, 'async_trait>(
        &'life0 self,
        device: String,
        baudrate: Baudrate
    ) -> Pin<Box<dyn Future<Output = Result<ScanResponse, ApiError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

API where Context isn’t passed on every API call

Required methods

fn poll_ready(
    &self,
    _cx: &mut Context<'_>
) -> Poll<Result<(), Box<dyn Error + Send + Sync + 'static>>>
[src]

fn context(&self) -> &C[src]

#[must_use]
fn get<'life0, 'async_trait>(
    &'life0 self,
    device: String,
    baudrate: Baudrate,
    address: String
) -> Pin<Box<dyn Future<Output = Result<GetResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn get_multi<'life0, 'async_trait>(
    &'life0 self,
    device: String,
    baudrate: Baudrate,
    address: String,
    maxframes: i32
) -> Pin<Box<dyn Future<Output = Result<GetMultiResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn hat<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<HatResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn hat_off<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<HatOffResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn hat_on<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<HatOnResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn mbus_api<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<MbusApiResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn scan<'life0, 'async_trait>(
    &'life0 self,
    device: String,
    baudrate: Baudrate
) -> Pin<Box<dyn Future<Output = Result<ScanResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...

Implementations on Foreign Types

impl<T: Api<C> + Send + Sync, C: Clone + Send + Sync> ApiNoContext<C> for ContextWrapper<T, C>[src]

fn poll_ready(
    &self,
    cx: &mut Context<'_>
) -> Poll<Result<(), Box<dyn Error + Send + Sync + 'static>>>
[src]

fn context(&self) -> &C[src]

fn get<'life0, 'async_trait>(
    &'life0 self,
    device: String,
    baudrate: Baudrate,
    address: String
) -> Pin<Box<dyn Future<Output = Result<GetResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn get_multi<'life0, 'async_trait>(
    &'life0 self,
    device: String,
    baudrate: Baudrate,
    address: String,
    maxframes: i32
) -> Pin<Box<dyn Future<Output = Result<GetMultiResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn hat<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<HatResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn hat_off<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<HatOffResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn hat_on<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<HatOnResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn mbus_api<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<MbusApiResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

fn scan<'life0, 'async_trait>(
    &'life0 self,
    device: String,
    baudrate: Baudrate
) -> Pin<Box<dyn Future<Output = Result<ScanResponse, ApiError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...

Implementors

Loading content...