Enum tonari_actor::timed::TimedMessage[][src]

pub enum TimedMessage<M> {
    Instant {
        message: M,
    },
    Delayed {
        message: M,
        fire_at: Instant,
    },
    Recurring {
        factory: Box<dyn FnMut() -> M + Send>,
        fire_at: Instant,
        interval: Duration,
    },
}
Expand description

A message that can be delivered now, at certain time and optionally repeatedly.

Variants

Instant

Fields of Instant

message: M
Delayed

Fields of Delayed

message: Mfire_at: Instant
Recurring

Fields of Recurring

factory: Box<dyn FnMut() -> M + Send>fire_at: Instantinterval: Duration

Trait Implementations

This implementation allows sending direct unwrapped messages to wrapped actors.

Performs the conversion.

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.

Performs the conversion.

Performs the conversion.

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.