pub enum LivePeriod {
Timeframe(Seconds),
Indefinite,
}Expand description
Period in seconds for which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
Variants§
Implementations§
Source§impl LivePeriod
impl LivePeriod
pub fn timeframe(&self) -> Option<Seconds>
pub fn is_indefinite(&self) -> bool
pub fn from_u32(seconds: u32) -> LivePeriod
pub fn from_seconds(seconds: Seconds) -> LivePeriod
Trait Implementations§
Source§impl Clone for LivePeriod
impl Clone for LivePeriod
Source§fn clone(&self) -> LivePeriod
fn clone(&self) -> LivePeriod
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LivePeriod
Source§impl Debug for LivePeriod
impl Debug for LivePeriod
Source§impl<'de> Deserialize<'de> for LivePeriod
impl<'de> Deserialize<'de> for LivePeriod
Source§fn deserialize<D>(
deserializer: D,
) -> Result<LivePeriod, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<LivePeriod, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for LivePeriod
impl Display for LivePeriod
impl Eq for LivePeriod
Source§impl Hash for LivePeriod
impl Hash for LivePeriod
Source§impl Into<LivePeriod> for Seconds
impl Into<LivePeriod> for Seconds
Source§fn into(self) -> LivePeriod
fn into(self) -> LivePeriod
Converts this type into the (usually inferred) input type.
Source§impl Ord for LivePeriod
impl Ord for LivePeriod
Source§fn cmp(&self, other: &LivePeriod) -> Ordering
fn cmp(&self, other: &LivePeriod) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for LivePeriod
impl PartialEq for LivePeriod
Source§impl PartialOrd for LivePeriod
impl PartialOrd for LivePeriod
Source§impl Serialize for LivePeriod
impl Serialize for LivePeriod
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for LivePeriod
Source§impl TryInto<Seconds> for LivePeriod
impl TryInto<Seconds> for LivePeriod
Auto Trait Implementations§
impl Forget for LivePeriod
impl Freeze for LivePeriod
impl Move for LivePeriod
impl RefUnwindSafe for LivePeriod
impl Send for LivePeriod
impl Sync for LivePeriod
impl Unpin for LivePeriod
impl UnsafeUnpin for LivePeriod
impl UnwindSafe for LivePeriod
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more