Skip to main content

Event

Trait Event 

Source
pub trait Event:
    Copy
    + PartialEq
    + Debug {
    const PLACEHOLDER: Self;

    // Required method
    fn at(&self) -> Instant<Utc>;
}
Expand description

Type storable in an EventList: something that happened at an instant.

Implemented by every context’s event enum and by application unions. The placeholder fills unused slots so the store needs no allocator and no unsafe; it is never read.

Required Associated Constants§

Source

const PLACEHOLDER: Self

Unused-slot value; never observed.

Required Methods§

Source

fn at(&self) -> Instant<Utc>

Time of the event.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§