pub enum Timeout {
Default,
Never,
Milliseconds(u32),
}
Expand description
Describes the timeout of a notification
§FromStr
You can also parse a Timeout
from a &str
.
assert_eq!("default".parse(), Ok(Timeout::Default));
assert_eq!("never".parse(), Ok(Timeout::Never));
assert_eq!("42".parse(), Ok(Timeout::Milliseconds(42)));
Variants§
Default
Expires according to server default.
Whatever that might be…
Never
Do not expire, user will have to close this manually.
Milliseconds(u32)
Expire after n milliseconds.
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 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