Trait actix::io::WriteHandler [−][src]
pub trait WriteHandler<E> where
Self: Actor,
Self::Context: ActorContext, { fn error(&mut self, err: E, ctx: &mut Self::Context) -> Running { ... } fn finished(&mut self, ctx: &mut Self::Context) { ... } }
Write handler
WriteHandler
is a helper for AsyncWrite
types. Implementation
of this trait is required for Writer
and FramedWrite
support.
Provided Methods
fn error(&mut self, err: E, ctx: &mut Self::Context) -> Running
Method is called when writer emits error.
If this method returns ErrorAction::Continue
writer processing
continues otherwise stream processing stops.
fn finished(&mut self, ctx: &mut Self::Context)
Method is called when writer finishes.
By default this method stops actor's Context
.