pub struct SystemHandle { /* private fields */ }Expand description
Public, opaque handle to the running super::ActorSystem that an actor
can use to reach a small, curated subset of the system surface — currently
just Self::scheduler. The handle holds a Weak reference so it does
not keep the system alive; callers must check Self::is_alive (or
receive None from Self::scheduler) before relying on it.
This type is the canonical way for binding layers (e.g. pycore) to
register cancellable timers from inside Actor::handle without spawning
detached tokio::spawn tasks. The internal ActorSystemInner type is
crate-private, so this thin wrapper is the only stable public path.
Implementations§
Trait Implementations§
Source§impl Clone for SystemHandle
impl Clone for SystemHandle
Source§fn clone(&self) -> SystemHandle
fn clone(&self) -> SystemHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SystemHandle
impl !RefUnwindSafe for SystemHandle
impl Send for SystemHandle
impl Sync for SystemHandle
impl Unpin for SystemHandle
impl UnsafeUnpin for SystemHandle
impl !UnwindSafe for SystemHandle
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