pub struct DateTimeWithoutTimezone { /* private fields */ }Implementations§
Source§impl DateTimeWithoutTimezone
impl DateTimeWithoutTimezone
pub fn new( year: i64, month: u8, day: u8, hour: u8, minute: u8, second: u8, nanosecond: u32, ) -> Option<Self>
Sourcepub fn from_date_time(
date: DateWithoutTimezone,
time: TimeWithoutTimezone,
) -> Option<Self>
pub fn from_date_time( date: DateWithoutTimezone, time: TimeWithoutTimezone, ) -> Option<Self>
Create a DateTimeWithoutTimezone from a DateWithoutTimezone and TimeWithoutTimezone.
pub fn date(&self) -> DateWithoutTimezone
pub fn time(&self) -> TimeWithoutTimezone
pub fn year(&self) -> i64
pub fn month(&self) -> u8
pub fn day(&self) -> u8
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) -> DateTime
pub fn truncate_minutes(&self, minutes: u8) -> Self
Trait Implementations§
Source§impl AmadeusOrd for DateTimeWithoutTimezone
impl AmadeusOrd for DateTimeWithoutTimezone
fn amadeus_cmp(&self, other: &Self) -> Ordering
Source§impl Clone for DateTimeWithoutTimezone
impl Clone for DateTimeWithoutTimezone
Source§fn clone(&self) -> DateTimeWithoutTimezone
fn clone(&self) -> DateTimeWithoutTimezone
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 DateTimeWithoutTimezone
impl Data for DateTimeWithoutTimezone
type Vec = Vec<DateTimeWithoutTimezone>
type DynamicType = ()
fn new_vec(_type: Self::DynamicType) -> Self::Vec
Source§impl Debug for DateTimeWithoutTimezone
impl Debug for DateTimeWithoutTimezone
Source§impl<'de> Deserialize<'de> for DateTimeWithoutTimezone
impl<'de> Deserialize<'de> for DateTimeWithoutTimezone
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 DateTimeWithoutTimezone
impl Display for DateTimeWithoutTimezone
Source§impl DowncastFrom<Value> for DateTimeWithoutTimezone
impl DowncastFrom<Value> for DateTimeWithoutTimezone
fn downcast_from(self_: Value) -> Result<Self, DowncastError>
Source§impl From<DateTimeWithoutTimezone> for Value
impl From<DateTimeWithoutTimezone> for Value
Source§fn from(value: DateTimeWithoutTimezone) -> Self
fn from(value: DateTimeWithoutTimezone) -> Self
Converts to this type from the input type.
Source§impl FromStr for DateTimeWithoutTimezone
impl FromStr for DateTimeWithoutTimezone
Source§impl Hash for DateTimeWithoutTimezone
impl Hash for DateTimeWithoutTimezone
Source§impl Ord for DateTimeWithoutTimezone
impl Ord for DateTimeWithoutTimezone
Source§fn cmp(&self, other: &DateTimeWithoutTimezone) -> Ordering
fn cmp(&self, other: &DateTimeWithoutTimezone) -> 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<DateTimeWithoutTimezone> for Value
impl PartialEq<DateTimeWithoutTimezone> for Value
Source§impl PartialEq for DateTimeWithoutTimezone
impl PartialEq for DateTimeWithoutTimezone
Source§impl PartialOrd for DateTimeWithoutTimezone
impl PartialOrd for DateTimeWithoutTimezone
Source§impl Serialize for DateTimeWithoutTimezone
impl Serialize for DateTimeWithoutTimezone
impl Copy for DateTimeWithoutTimezone
impl Eq for DateTimeWithoutTimezone
impl StructuralPartialEq for DateTimeWithoutTimezone
Auto Trait Implementations§
impl Freeze for DateTimeWithoutTimezone
impl RefUnwindSafe for DateTimeWithoutTimezone
impl Send for DateTimeWithoutTimezone
impl Sync for DateTimeWithoutTimezone
impl Unpin for DateTimeWithoutTimezone
impl UnwindSafe for DateTimeWithoutTimezone
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