Trait dabus::BusErrorUtil

source ·
pub trait BusErrorUtil<T> {
    // Required method
    fn unwrap_or_fwd<'life0, 'async_trait>(
        self,
        bus: &'life0 BusInterface
    ) -> Pin<Box<dyn Future<Output = T> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Utility for handling bus errors inside of bus handlers

Required Methods§

source

fn unwrap_or_fwd<'life0, 'async_trait>( self, bus: &'life0 BusInterface ) -> Pin<Box<dyn Future<Output = T> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

unwraps an Result, or forwards the error to BusInterface::fwd_bus_err.

see BusInterface::fwd_bus_err for more information

Implementations on Foreign Types§

source§

impl<T: Send> BusErrorUtil<T> for Result<T, CallTrace>

source§

fn unwrap_or_fwd<'life0, 'async_trait>( self, bus: &'life0 BusInterface ) -> Pin<Box<dyn Future<Output = T> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

unwraps an Result, or forwards the error to BusInterface::fwd_bus_err.

see BusInterface::fwd_bus_err for more information

Implementors§