Trait actix::io::WriteHandler

source ·
pub trait WriteHandler<E>
where Self: Actor, Self::Context: ActorContext,
{ // Provided methods fn error(&mut self, err: E, ctx: &mut Self::Context) -> Running { ... } fn finished(&mut self, ctx: &mut Self::Context) { ... } }
Expand description

A helper trait for write handling.

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

Provided Methods§

source

fn error(&mut self, err: E, ctx: &mut Self::Context) -> Running

Called when the writer emits error.

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

source

fn finished(&mut self, ctx: &mut Self::Context)

Called when the writer finishes.

By default this method stops actor’s Context.

Object Safety§

This trait is not object safe.

Implementors§