pub struct TimeWithoutTimezone(/* private fields */);Implementations§
Source§impl TimeWithoutTimezone
impl TimeWithoutTimezone
Sourcepub fn new(hour: u8, minute: u8, second: u8, nanosecond: u32) -> Option<Self>
pub fn new(hour: u8, minute: u8, second: u8, nanosecond: u32) -> Option<Self>
Create a TimeWithoutTimezone from hour, minute, second and nanosecond.
The nanosecond part can exceed 1,000,000,000 in order to represent the leap second.
Returns None on invalid hour, minute, second and/or nanosecond.
Sourcepub fn from_seconds(seconds: u32, nanosecond: u32) -> Option<Self>
pub fn from_seconds(seconds: u32, nanosecond: u32) -> Option<Self>
Create a TimeWithoutTimezone from the number of seconds since midnight and nanosecond.
The nanosecond part can exceed 1,000,000,000 in order to represent the leap second.
Returns None on invalid number of seconds and/or nanosecond.
pub fn hour(&self) -> u8
pub fn minute(&self) -> u8
pub fn second(&self) -> u8
pub fn nanosecond(&self) -> u32
pub fn with_timezone(self, timezone: Timezone) -> Time
pub fn truncate_minutes(&self, minutes: u8) -> Self
Trait Implementations§
Source§impl AmadeusOrd for TimeWithoutTimezone
impl AmadeusOrd for TimeWithoutTimezone
fn amadeus_cmp(&self, other: &Self) -> Ordering
Source§impl Clone for TimeWithoutTimezone
impl Clone for TimeWithoutTimezone
Source§fn clone(&self) -> TimeWithoutTimezone
fn clone(&self) -> TimeWithoutTimezone
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Data for TimeWithoutTimezone
impl Data for TimeWithoutTimezone
type Vec = Vec<TimeWithoutTimezone>
type DynamicType = ()
fn new_vec(_type: Self::DynamicType) -> Self::Vec
Source§impl Debug for TimeWithoutTimezone
impl Debug for TimeWithoutTimezone
Source§impl<'de> Deserialize<'de> for TimeWithoutTimezone
impl<'de> Deserialize<'de> for TimeWithoutTimezone
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
Source§impl Display for TimeWithoutTimezone
impl Display for TimeWithoutTimezone
Source§impl DowncastFrom<Value> for TimeWithoutTimezone
impl DowncastFrom<Value> for TimeWithoutTimezone
fn downcast_from(self_: Value) -> Result<Self, DowncastError>
Source§impl From<TimeWithoutTimezone> for Value
impl From<TimeWithoutTimezone> for Value
Source§fn from(value: TimeWithoutTimezone) -> Self
fn from(value: TimeWithoutTimezone) -> Self
Converts to this type from the input type.
Source§impl FromStr for TimeWithoutTimezone
impl FromStr for TimeWithoutTimezone
Source§impl Hash for TimeWithoutTimezone
impl Hash for TimeWithoutTimezone
Source§impl Ord for TimeWithoutTimezone
impl Ord for TimeWithoutTimezone
Source§fn cmp(&self, other: &TimeWithoutTimezone) -> Ordering
fn cmp(&self, other: &TimeWithoutTimezone) -> Ordering
1.21.0 · 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
Source§impl PartialEq<TimeWithoutTimezone> for Value
impl PartialEq<TimeWithoutTimezone> for Value
Source§impl PartialEq for TimeWithoutTimezone
impl PartialEq for TimeWithoutTimezone
Source§impl PartialOrd for TimeWithoutTimezone
impl PartialOrd for TimeWithoutTimezone
Source§impl Serialize for TimeWithoutTimezone
impl Serialize for TimeWithoutTimezone
impl Copy for TimeWithoutTimezone
impl Eq for TimeWithoutTimezone
impl StructuralPartialEq for TimeWithoutTimezone
Auto Trait Implementations§
impl Freeze for TimeWithoutTimezone
impl RefUnwindSafe for TimeWithoutTimezone
impl Send for TimeWithoutTimezone
impl Sync for TimeWithoutTimezone
impl Unpin for TimeWithoutTimezone
impl UnwindSafe for TimeWithoutTimezone
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§impl<A, B> Downcast<A> for Bwhere
A: DowncastFrom<B>,
impl<A, B> Downcast<A> for Bwhere
A: DowncastFrom<B>,
fn downcast(self) -> Result<A, DowncastError>
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> 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