pub enum Timeout {
None,
Ticks(u64),
Forever,
}Expand description
How long a blocking call may wait.
Variants§
None
Do not block: a tick count of 0 in C.
Ticks(u64)
Block for this many ticks at most.
Forever
Block until the condition holds: portMAX_DELAY in C.
Implementations§
Source§impl Timeout
impl Timeout
Sourcepub fn to_ticks<C>(self) -> u64where
C: Config,
pub fn to_ticks<C>(self) -> u64where
C: Config,
The C-side tick count: 0, the count, or the width’s maximum.
Sourcepub fn from_ticks<C>(ticks: u64) -> Timeoutwhere
C: Config,
pub fn from_ticks<C>(ticks: u64) -> Timeoutwhere
C: Config,
From a C-side tick count: 0 is Timeout::None, the width’s
maximum is Timeout::Forever, anything else is that many ticks.
Trait Implementations§
impl Copy for Timeout
impl Eq for Timeout
impl StructuralPartialEq for Timeout
Auto Trait Implementations§
impl Freeze for Timeout
impl RefUnwindSafe for Timeout
impl Send for Timeout
impl Sync for Timeout
impl Unpin for Timeout
impl UnsafeUnpin for Timeout
impl UnwindSafe for Timeout
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