[−][src]Trait act_zero::AddrLike
Trait provides methods for spawning futures onto an actor. Implemented by
Addr
and WeakAddr
alike.
Associated Types
Loading content...Required methods
fn send_fut(&self, fut: impl Future<Output = ()> + Send + 'static)
Spawn a future onto the actor which does not return a value.
Provided methods
fn call_fut<R: Send + 'static>(
&self,
fut: impl Future<Output = Produces<R>> + Send + 'static
) -> Produces<R>ⓘ
&self,
fut: impl Future<Output = Produces<R>> + Send + 'static
) -> Produces<R>ⓘ
Spawn a future onto the actor and provide the means to get back the result. The future will be cancelled if the receiver is dropped before it has completed.
fn send_fut_with<F: Future<Output = ()> + Send + 'static>(
&self,
f: impl FnOnce(Self) -> F
)
&self,
f: impl FnOnce(Self) -> F
)
Equivalent to send_fut
but provides access to the actor's address.
fn call_fut_with<R: Send + 'static, F: Future<Output = Produces<R>> + Send + 'static>(
&self,
f: impl FnOnce(Self) -> F
) -> Produces<R>ⓘ
&self,
f: impl FnOnce(Self) -> F
) -> Produces<R>ⓘ
Equivalent to call_fut
but provides access to the actor's address.
fn termination(&self) -> TerminationⓘNotable traits for Termination
impl Future for Termination type Output = ();
Notable traits for Termination
impl Future for Termination type Output = ();
Returns a future which resolves when the actor terminates. If the actor has already terminated, or if this address is detached, the future will resolve immediately.