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<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
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