pub trait WriteHandler<E>: Actorwhere
    Self::Context: ActorContext,
{ fn error(&mut self, err: E, ctx: &mut Self::Context) -> Running { ... } fn finished(&mut self, ctx: &mut Self::Context) { ... } }
Expand description

Write handler

WriteHandler is a helper for AsyncWrite types. Implementation of this trait is required for Writer and FramedWrite support.

Provided Methods

Method is called when writer emits error.

If this method returns ErrorAction::Continue writer processing continues otherwise stream processing stops.

Method is called when writer finishes.

By default this method stops actor’s Context.

Implementors