[−][src]Struct thespian::Actor
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]
State: Debug,
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]
&'_ self,
caller: fn(_: &State, _: Sender<Reply>)
) -> Reply
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]
&'_ self,
caller: fn(_: &State, _: Sender<Reply>)
) -> Reply
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
.
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<State, Reply> !RefUnwindSafe for Actor<State, Reply>
[src]
impl<State, Reply> Send for Actor<State, Reply> where
Reply: Send,
[src]
Reply: Send,
impl<State, Reply> Sync for Actor<State, Reply> where
Reply: Send,
[src]
Reply: Send,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,