pub struct DevicePollOptions {
pub sleep: Option<SleepFn>,
pub now: Option<ClockFn>,
pub cancel: Option<CancelToken>,
}Expand description
Test hooks and cancellation for the device poll.
Fields§
§sleep: Option<SleepFn>Replaces the real wait. It is given the full wait and must not return early on its own.
now: Option<ClockFn>Replaces the monotonic clock the device code’s own deadline is judged against.
cancel: Option<CancelToken>Stops the wait and the flow with AuthError::Cancelled.
Trait Implementations§
Source§impl Clone for DevicePollOptions
impl Clone for DevicePollOptions
Source§fn clone(&self) -> DevicePollOptions
fn clone(&self) -> DevicePollOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DevicePollOptions
impl Debug for DevicePollOptions
Source§impl Default for DevicePollOptions
impl Default for DevicePollOptions
Source§fn default() -> DevicePollOptions
fn default() -> DevicePollOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DevicePollOptions
impl !RefUnwindSafe for DevicePollOptions
impl Send for DevicePollOptions
impl Sync for DevicePollOptions
impl Unpin for DevicePollOptions
impl UnsafeUnpin for DevicePollOptions
impl !UnwindSafe for DevicePollOptions
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