pub struct MockEngine { /* private fields */ }Implementations§
Source§impl MockEngine
impl MockEngine
pub fn new() -> Self
pub fn with_now(now: Duration) -> Self
pub fn queue_event(&mut self, event: TimedEvent)
pub fn queue_events<I>(&mut self, events: I)where
I: IntoIterator<Item = TimedEvent>,
pub fn fail_send_for_seq( &mut self, seq: SequenceNumber, message: impl Into<String>, )
pub fn sent_requests(&self) -> &[ProbeRequest]
pub fn now_time(&self) -> EngineTime
Trait Implementations§
Source§impl Clone for MockEngine
impl Clone for MockEngine
Source§fn clone(&self) -> MockEngine
fn clone(&self) -> MockEngine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MockEngine
impl Debug for MockEngine
Source§impl Default for MockEngine
impl Default for MockEngine
Source§fn default() -> MockEngine
fn default() -> MockEngine
Returns the “default value” for a type. Read more
Source§impl PingEngine for MockEngine
impl PingEngine for MockEngine
fn now(&self) -> EngineTime
fn send_probe(&mut self, request: ProbeRequest) -> Result<(), PingEngineError>
Source§fn poll_until(
&mut self,
deadline: EngineTime,
) -> Result<Vec<TimedEvent>, PingEngineError>
fn poll_until( &mut self, deadline: EngineTime, ) -> Result<Vec<TimedEvent>, PingEngineError>
Polls for the next event up to
deadline. Read moreAuto Trait Implementations§
impl Freeze for MockEngine
impl RefUnwindSafe for MockEngine
impl Send for MockEngine
impl Sync for MockEngine
impl Unpin for MockEngine
impl UnsafeUnpin for MockEngine
impl UnwindSafe for MockEngine
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