Trait actix::FramedActor [] [src]

pub trait FramedActor: Actor {
    type Io: AsyncRead + AsyncWrite;
    type Codec: Encoder + Decoder;
    fn error(
        &mut self,
        err: <Self::Codec as Encoder>::Error,
        ctx: &mut Self::Context
    ) { ... }
fn framed<Addr>(self, io: Self::Io, codec: Self::Codec) -> Addr
    where
        Self: Actor<Context = FramedContext<Self>> + ActorAddress<Self, Addr>,
        Self: StreamHandler<<Self::Codec as Decoder>::Item, <Self::Codec as Decoder>::Error>
, { ... }
fn create_framed<Addr, F>(io: Self::Io, codec: Self::Codec, f: F) -> Addr
    where
        Self: Actor<Context = FramedContext<Self>> + ActorAddress<Self, Addr>,
        Self: StreamHandler<<Self::Codec as Decoder>::Item, <Self::Codec as Decoder>::Error>,
        F: FnOnce(&mut FramedContext<Self>) -> Self + 'static
, { ... } }

Actor trait that allows to handle tokio_io::codec::Framed objects.

Associated Types

Io type

Codec type

Provided Methods

Method is called on sink error. By default it does nothing.

Start new actor, returns address of this actor.

This function starts new actor, returns address of this actor. Actor is created by factory function.

Implementors