pub struct ActorCell {
pub state: Value,
pub handler: Value,
}Expand description
Internal state of a conc.Actor. Protected by a Mutex so that
concurrent callers serialise on message delivery (the actor processes
one message at a time). The handler closure is called on the
calling VM’s thread — no extra OS thread required — which lets it
invoke arbitrary effects (sql, net, …) through the same handler chain.
Fields§
§state: Value§handler: ValueTrait Implementations§
Auto Trait Implementations§
impl Freeze for ActorCell
impl !RefUnwindSafe for ActorCell
impl Send for ActorCell
impl Sync for ActorCell
impl Unpin for ActorCell
impl UnsafeUnpin for ActorCell
impl !UnwindSafe for ActorCell
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more