Enum notify_rust::Timeout
source · 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)