Skip to main content

NetEvent

Enum NetEvent 

Source
pub enum NetEvent {
    PacketCreated(EventUTC, PacketID),
    PacketConsumed(EventUTC, PacketID, PacketLocation),
    PacketDestroyed(EventUTC, PacketID, PacketLocation),
    EpochCreated(EventUTC, EpochID),
    EpochStarted(EventUTC, EpochID),
    EpochFinished(EventUTC, Epoch),
    EpochCancelled(EventUTC, Epoch),
    PacketMoved(EventUTC, PacketID, PacketLocation, PacketLocation, usize),
    InputSalvoTriggered(EventUTC, EpochID, SalvoConditionName),
    OutputSalvoTriggered(EventUTC, EpochID, SalvoConditionName),
    PacketOrphaned(EventUTC, PacketID, EpochID, NodeName, PortName, SalvoConditionName),
}
Expand description

An event that occurred during a network action.

Events provide a complete audit trail of all state changes in the network. Each event includes a timestamp and relevant identifiers. Events contain all information needed to undo the operation.

Variants§

§

PacketCreated(EventUTC, PacketID)

A new packet was created.

§

PacketConsumed(EventUTC, PacketID, PacketLocation)

A packet was consumed (normal removal from the network). Includes the packet’s location before consumption for undo support.

§

PacketDestroyed(EventUTC, PacketID, PacketLocation)

A packet was destroyed (abnormal removal, e.g., epoch cancellation). Includes the packet’s location before destruction for undo support.

§

EpochCreated(EventUTC, EpochID)

A new epoch was created (in Startable state).

§

EpochStarted(EventUTC, EpochID)

An epoch transitioned from Startable to Running.

§

EpochFinished(EventUTC, Epoch)

An epoch completed successfully. Includes the full epoch state for undo support.

§

EpochCancelled(EventUTC, Epoch)

An epoch was cancelled. Includes the full epoch state for undo support.

§

PacketMoved(EventUTC, PacketID, PacketLocation, PacketLocation, usize)

A packet moved from one location to another. Includes the index in the source location for perfect undo restoration. (timestamp, packet_id, from_location, to_location, from_index)

§

InputSalvoTriggered(EventUTC, EpochID, SalvoConditionName)

An input salvo condition was triggered, creating an epoch.

§

OutputSalvoTriggered(EventUTC, EpochID, SalvoConditionName)

An output salvo condition was triggered, sending packets.

§

PacketOrphaned(EventUTC, PacketID, EpochID, NodeName, PortName, SalvoConditionName)

A packet was sent to an unconnected output port and moved to OutsideNet. (timestamp, packet_id, epoch_id, node_name, port_name, salvo_condition)

Trait Implementations§

Source§

impl Clone for NetEvent

Source§

fn clone(&self) -> NetEvent

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NetEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V