[][src]Struct ghost_actor::BoxGhostActor

pub struct BoxGhostActor(pub Box<dyn AsGhostActor>);

Newtype wrapping boxed trait-object version of GhostActor.

Implementations

impl BoxGhostActor[src]

pub fn to_boxed(&self) -> BoxGhostActor[src]

Get a type-erased BoxGhostActor version of this handle.

pub fn invoke<T, R, E, F>(&self, invoke: F) -> GhostFuture<R, E>

Notable traits for GhostFuture<R, E>

impl<R, E> Future for GhostFuture<R, E> where
    E: 'static + From<GhostError> + Send
type Output = Result<R, E>;
where
    T: 'static + Send,
    R: 'static + Send,
    E: 'static + From<GhostError> + Send,
    F: FnOnce(&mut T) -> Result<R, E> + 'static + Send
[src]

Push state read/mutation logic onto actor queue for processing.

pub fn is_active(&self) -> bool[src]

Returns true if the channel is still connected to the actor task.

pub fn shutdown(&self)[src]

Close the channel to the actor task. This will result in the task being dropped once all pending invocations have been processed.

Trait Implementations

impl AsGhostActor for BoxGhostActor[src]

impl Clone for BoxGhostActor[src]

impl Eq for BoxGhostActor[src]

impl Hash for BoxGhostActor[src]

impl PartialEq<BoxGhostActor> for BoxGhostActor[src]

impl StructuralEq for BoxGhostActor[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> Instrument 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.