pub enum Seconds {
Value(u64),
Unlimited,
}Expand description
A duration in seconds, or an “unbounded” sentinel.
Several VoIP.ms queue/announcement fields take a number of seconds or a
word meaning no limit (none / unlimited), so a bare u64 can’t hold the
sentinel. Seconds serializes the sentinel as none; WaitTime as
unlimited (the word maximum_wait_time documents). Both deserialize
tolerantly: a number, a numeric string, or either sentinel word.
Variants§
Trait Implementations§
impl Copy for Seconds
Source§impl<'de> Deserialize<'de> for Seconds
impl<'de> Deserialize<'de> for Seconds
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Seconds
impl StructuralPartialEq for Seconds
Auto Trait Implementations§
impl Freeze for Seconds
impl RefUnwindSafe for Seconds
impl Send for Seconds
impl Sync for Seconds
impl Unpin for Seconds
impl UnsafeUnpin for Seconds
impl UnwindSafe for Seconds
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