[][src]Struct ghost_actor::actor_builder::GhostActorChannelFactory

pub struct GhostActorChannelFactory<H: GhostControlHandler> { /* fields omitted */ }

Allows attaching new GhostEvent channels to a GhostActor task.

Implementations

impl<H: GhostControlHandler> GhostActorChannelFactory<H>[src]

pub fn attach_receiver<E, R>(&self, receiver: R) -> GhostFuture<()> where
    E: GhostEvent + GhostDispatch<H>,
    H: GhostControlHandler + GhostHandler<E>,
    R: GhostChannelReceiver<E>, 
[src]

Attach an event receiver to this running (or pending build) GhostActor. You can attach anything that implements GhostChannelRecevier<E: GhostEvent>.

pub fn create_channel<E>(&self) -> GhostFuture<GhostSender<E>> where
    E: GhostEvent + GhostDispatch<H>,
    H: GhostControlHandler + GhostHandler<E>, 
[src]

Attach a new event sender to a running (or pending build) GhostActor. Note - you should only call this once for each GhostEvent type. If you want multiple senders for a GhostEvent, clone the resulting Sender.

Trait Implementations

impl<H: GhostControlHandler> Clone for GhostActorChannelFactory<H>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.