Trait actix::FramedActor [] [src]

pub trait FramedActor: Actor {
    type Io: AsyncRead + AsyncWrite;
    type Codec: Encoder + Decoder;
    fn handle(
        &mut self,
        msg: Result<<Self::Codec as Decoder>::Item, <Self::Codec as Decoder>::Error>,
        ctx: &mut Self::Context
    ); fn closed(
        &mut self,
        error: Option<<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>
, { ... }
fn from_framed<Addr>(self, framed: Framed<Self::Io, Self::Codec>) -> Addr
    where
        Self: Actor<Context = FramedContext<Self>> + ActorAddress<Self, Addr>
, { ... }
fn create_framed<Addr, F>(io: Self::Io, codec: Self::Codec, f: F) -> Addr
    where
        Self: Actor<Context = FramedContext<Self>> + ActorAddress<Self, Addr>,
        F: FnOnce(&mut FramedContext<Self>) -> Self + 'static
, { ... }
fn create_from_framed<Addr, F>(
        framed: Framed<Self::Io, Self::Codec>,
        f: F
    ) -> Addr
    where
        Self: Actor<Context = FramedContext<Self>> + ActorAddress<Self, Addr>,
        F: FnOnce(&mut FramedContext<Self>) -> Self + 'static
, { ... } }

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

Associated Types

Io type

Codec type

Required Methods

This message is called for every decoded message from framed object.

Provided Methods

This method is called when framed object get closed.

error indicates if framed get closed because of error.

Start new actor, returns address of this actor.

Start new actor, returns address of this actor.

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

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

Implementors