pub struct Addr<A: 'static> { /* private fields */ }Implementations§
Source§impl<A: 'static> Addr<A>
impl<A: 'static> Addr<A>
Sourcepub fn new_managed(state: A, token: UiThreadToken) -> Selfwhere
A: ManagedActor,
pub fn new_managed(state: A, token: UiThreadToken) -> Selfwhere
A: ManagedActor,
An actor actor! declared. What its manifest subscribes to is held by
the actor, and ends when it is disposed.
Sourcepub fn subscribe_on<M: Event>(&self, bus: Bus)where
A: Handler<M>,
pub fn subscribe_on<M: Event>(&self, bus: Bus)where
A: Handler<M>,
Hears M on bus for as long as the actor lives: disposing it ends
the subscription.
pub fn new(state: A, guard: UiThreadToken) -> Self
pub fn send<M>(&self, msg: M)where
M: 'static,
A: Handler<M>,
pub fn get_token(&self) -> UiThreadToken
pub fn strong_count_ptr(&self) -> Rc<&'static str>
pub fn id(&self) -> usize
Sourcepub fn cancellation(&self) -> Cancel
pub fn cancellation(&self) -> Cancel
The token every task this actor spawned is guarded by; cancelled by
Addr::dispose, and so by the teardown that owns the actor.
pub fn debug_snapshot(&self) -> Stringwhere
A: Debug,
Trait Implementations§
Auto Trait Implementations§
impl<A> !RefUnwindSafe for Addr<A>
impl<A> !Send for Addr<A>
impl<A> !Sync for Addr<A>
impl<A> !UnwindSafe for Addr<A>
impl<A> Freeze for Addr<A>
impl<A> Unpin for Addr<A>
impl<A> UnsafeUnpin for Addr<A>
Blanket Implementations§
impl<M> AllowedSignal<M> for Mwhere
M: 'static,
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