[][src]Struct rustasim::engine::Event

pub struct Event<T, U> where
    T: Ord + Copy + Zero
{ pub time: T, pub src: usize, pub event_type: EventType<U>, }

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

impl<T: Debug, U: Debug> Debug for Event<T, U> where
    T: Ord + Copy + Zero
[src]

Auto Trait Implementations

impl<T, U> RefUnwindSafe for Event<T, U> where
    T: RefUnwindSafe,
    U: RefUnwindSafe

impl<T, U> Send for Event<T, U> where
    T: Send,
    U: Send

impl<T, U> Sync for Event<T, U> where
    T: Sync,
    U: Sync

impl<T, U> Unpin for Event<T, U> where
    T: Unpin,
    U: Unpin

impl<T, U> UnwindSafe for Event<T, U> where
    T: UnwindSafe,
    U: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,