Trait Interceptor

Source
pub trait Interceptor {
    type Error: 'static;

    // Provided methods
    fn before(
        &self,
        context: Context<Self::Error>,
    ) -> Box<dyn Future<Item = Context<Self::Error>, Error = Self::Error>> { ... }
    fn after(
        &self,
        context: Context<Self::Error>,
    ) -> Box<dyn Future<Item = Context<Self::Error>, Error = Self::Error>> { ... }
}

Required Associated Types§

Source

type Error: 'static

Provided Methods§

Source

fn before( &self, context: Context<Self::Error>, ) -> Box<dyn Future<Item = Context<Self::Error>, Error = Self::Error>>

Source

fn after( &self, context: Context<Self::Error>, ) -> Box<dyn Future<Item = Context<Self::Error>, Error = Self::Error>>

Implementations on Foreign Types§

Source§

impl<I: Interceptor + ?Sized> Interceptor for Rc<I>

Source§

type Error = <I as Interceptor>::Error

Source§

fn before( &self, context: Context<Self::Error>, ) -> Box<dyn Future<Item = Context<Self::Error>, Error = Self::Error>>

Source§

fn after( &self, context: Context<Self::Error>, ) -> Box<dyn Future<Item = Context<Self::Error>, Error = Self::Error>>

Source§

impl<I: Interceptor + ?Sized> Interceptor for Arc<I>

Source§

type Error = <I as Interceptor>::Error

Source§

fn before( &self, context: Context<Self::Error>, ) -> Box<dyn Future<Item = Context<Self::Error>, Error = Self::Error>>

Source§

fn after( &self, context: Context<Self::Error>, ) -> Box<dyn Future<Item = Context<Self::Error>, Error = Self::Error>>

Implementors§

Source§

impl<C, E> Interceptor for InjectCoeffect<C, E>
where C: NewCoeffect, E: 'static,

Source§

type Error = E

Source§

impl<E> Interceptor for HandleEffects<E>
where E: 'static,

Source§

type Error = E

Source§

impl<E: 'static, T: Event<E>> Interceptor for EventInterceptor<T, E>

Source§

type Error = E