[][src]Trait meio::handlers::TryConsumer

pub trait TryConsumer<T>: Actor {
    type Error;
#[must_use]    pub fn handle<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        item: T,
        ctx: &'life1 mut Context<Self>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn error<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        error: Self::Error,
        ctx: &'life1 mut Context<Self>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

Represents a capability to receive message from a TryStream.

Associated Types

type Error[src]

Error value that can happen in a stream.

Loading content...

Required methods

#[must_use]pub fn handle<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    item: T,
    ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

The method called when the next item received from a Stream.

#[must_use]pub fn error<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    error: Self::Error,
    ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

The method called when the stream received an Error.

Loading content...

Implementors

Loading content...