pub struct Event { /* private fields */ }
Implementations§
source§impl Event
impl Event
sourcepub fn new_packet(packet: PacketRc, time: EmulatedTime, src_host: &Host) -> Self
pub fn new_packet(packet: PacketRc, time: EmulatedTime, src_host: &Host) -> Self
A new packet event, which is an event for packets arriving from the Internet. Packet events do not include packets on localhost.
sourcepub fn new_local(task: TaskRef, time: EmulatedTime, host: &Host) -> Self
pub fn new_local(task: TaskRef, time: EmulatedTime, host: &Host) -> Self
A new local event, which is an event that was generated locally by the host itself (timers, localhost packets, etc).
pub fn time(&self) -> EmulatedTime
pub fn set_time(&mut self, time: EmulatedTime)
Trait Implementations§
source§impl PartialOrd for Event
impl PartialOrd for Event
impl Eq for Event
Auto Trait Implementations§
impl Freeze for Event
impl !RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl !UnwindSafe for Event
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more