pub struct Link<I = Instant> { /* private fields */ }Expand description
An in-process link between two stacks.
Implementations§
Source§impl<I> Link<I>
impl<I> Link<I>
Sourcepub fn new(seed: u64, faults: Faults) -> Self
pub fn new(seed: u64, faults: Faults) -> Self
A link with these faults, replaying the same trace for the same seed.
Sourcepub fn send(&mut self, from: Side, bytes: Bytes, now: I)
pub fn send(&mut self, from: Side, bytes: Bytes, now: I)
Hand a datagram to the link, to arrive at some point at or after now.
Sourcepub fn take_due(&mut self, now: I) -> Vec<Delivery>
pub fn take_due(&mut self, now: I) -> Vec<Delivery>
Everything that has arrived at or before now, in arrival order.
Sourcepub fn next_arrival(&self) -> Option<I>
pub fn next_arrival(&self) -> Option<I>
When the next datagram arrives, if any is in flight.
Trait Implementations§
Auto Trait Implementations§
impl<I> Freeze for Link<I>
impl<I> RefUnwindSafe for Link<I>where
I: RefUnwindSafe,
impl<I> Send for Link<I>where
I: Send,
impl<I> Sync for Link<I>where
I: Sync,
impl<I> Unpin for Link<I>where
I: Unpin,
impl<I> UnsafeUnpin for Link<I>
impl<I> UnwindSafe for Link<I>where
I: 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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