pub struct Event<T, U>{
pub time: T,
pub src: usize,
pub event_type: EventType<U>,
}
Expand description
Fully describes an event.
The src
field will almost certainly get modified as it works its way through the event
merger. Event creators should set src
to be their own, unique, id, the
Merger
of the receiving actor will appropriately translate it into and
index.
Receivers should assume src
is the index of the source, and not the id.
Events are ordered by their time.
Fields§
§time: T
Time at which this event is scheduled to happen
src: usize
Unique ID of the source of the event
event_type: EventType<U>
Event type, either built-in, or user-defined
Trait Implementations§
Auto Trait Implementations§
impl<T, U> Freeze for Event<T, U>
impl<T, U> RefUnwindSafe for Event<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Event<T, U>
impl<T, U> Sync for Event<T, U>
impl<T, U> Unpin for Event<T, U>
impl<T, U> UnwindSafe for Event<T, U>where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations§
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