[][src]Struct thespian::Actor

pub struct Actor<State, Reply> { /* fields omitted */ }

Actor maintains a connection to its Process to allow Actor methods to be implemented via functions sent to the Process.

Implementations

impl<State, Reply> Actor<State, Reply> where
    State: Debug
[src]

pub fn call_ref(&self, caller: fn(_: &State))[src]

Executes a function in the Process with a reference to the state.

pub fn call_ref_mut(&self, caller: fn(_: &mut State))[src]

Executes a function in the Process with a mutable reference to the state.

pub async fn call_ref_reply<'_>(
    &'_ self,
    caller: fn(_: &State, _: Sender<Reply>)
) -> Reply
[src]

Executes a function in the Process with a reference to the state and a ReplySender.

pub async fn call_ref_mut_reply<'_>(
    &'_ self,
    caller: fn(_: &State, _: Sender<Reply>)
) -> Reply
[src]

Executes a function in the Process with a mutable reference to the state and a ReplySender.

Trait Implementations

impl<State, Reply> Clone for Actor<State, Reply>[src]

pub fn clone(&self) -> Self[src]

Actor may be freely cloned and share the backing Process.

Auto Trait Implementations

impl<State, Reply> !RefUnwindSafe for Actor<State, Reply>[src]

impl<State, Reply> Send for Actor<State, Reply> where
    Reply: Send
[src]

impl<State, Reply> Sync for Actor<State, Reply> where
    Reply: Send
[src]

impl<State, Reply> Unpin for Actor<State, Reply>[src]

impl<State, Reply> !UnwindSafe for Actor<State, Reply>[src]

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.