pub enum Timeout {
After(Duration),
Never,
}Expand description
Optional timeout.
Note that the maximum timeout is i32::MAX milliseconds (about 25 days). Longer
timeouts will be silently clipped to i32::MAX milliseconds.
Variants
After(Duration)
Timeout after a specific duration.
Never
Never timeout.
Implementations
sourceimpl Timeout
impl Timeout
sourcepub fn from_secs(seconds: u32) -> Self
pub fn from_secs(seconds: u32) -> Self
Create a timeout with the specified number of seconds.
See Timeout for an important note about the maximum timeout.
sourcepub fn from_millis(milliseconds: u32) -> Self
pub fn from_millis(milliseconds: u32) -> Self
Create a timeout with the specified number of milliseconds.
See Timeout for an important note about the maximum timeout.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Timeout
impl Send for Timeout
impl Sync for Timeout
impl Unpin for Timeout
impl UnwindSafe for Timeout
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more