Struct thespis_impl::Mailbox[][src]

pub struct Mailbox<A> where
    A: Actor
{ /* fields omitted */ }
Expand description

The mailbox implementation.

Implementations

Create a new inbox.

Getter for ActorInfo.

Create an Addr to send messages to this mailbox.

Run the mailbox. Returns a future that processes incoming messages. If the actor panics during message processing, this will return the mailbox to you so you can supervise actors by re-initiating your actor and then calling this method on the mailbox again. All addresses will remain valid in this scenario.

This means that we use AssertUnwindSafe and catch_unwind when calling your actor and the thread will not unwind. This means that your actor should implement std::panic::UnwindSafe. This might become an enforced trait bound for Actor in the future.

Warning: if you drop the future returned by this function in order to stop an actor, Actor::stopped will not be called.

Exactly as Mailbox::start, but works for !Send actors.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Get a unique identifier for this actor. You can use this to verify whether two addresss deliver to the same actor. Read more

A human readable name of the actor.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more