Struct aws_smithy_async::test_util::SleepGate
source · pub struct SleepGate { /* private fields */ }
Available on crate feature
test-util
only.Expand description
Gate that allows ControlledSleep
to advance.
See controlled_time_and_sleep
for more details
Implementations§
source§impl SleepGate
impl SleepGate
sourcepub async fn expect_sleep(&mut self) -> CapturedSleep<'_>
pub async fn expect_sleep(&mut self) -> CapturedSleep<'_>
Expect the time source to sleep
This returns the duration that was slept and a CapturedSleep
. The drop guard is used
to precisely control
sourcepub async fn skip_sleep(&mut self) -> Option<Duration>
pub async fn skip_sleep(&mut self) -> Option<Duration>
Skips any sleep that may be queued up, returning its duration
Auto Trait Implementations§
impl Freeze for SleepGate
impl !RefUnwindSafe for SleepGate
impl Send for SleepGate
impl Sync for SleepGate
impl Unpin for SleepGate
impl !UnwindSafe for SleepGate
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