Struct tz::UtcDateTime
source · [−]pub struct UtcDateTime { /* private fields */ }Expand description
UTC date time exprimed in the proleptic gregorian calendar
Implementations
sourceimpl UtcDateTime
impl UtcDateTime
sourcepub fn new(
full_year: i32,
month: u8,
month_day: u8,
hour: u8,
minute: u8,
second: u8
) -> Result<Self>
pub fn new(
full_year: i32,
month: u8,
month_day: u8,
hour: u8,
minute: u8,
second: u8
) -> Result<Self>
Construct an UTC date time
Inputs
full_year:Yearmonth:Month in[0, 11]month_day:Day of the month in[1, 31]hour:Hours since midnight in[0, 23]minute:Minutes in[0, 59]second:Seconds in[0, 60], with a possible leap second
sourcepub fn to_date_time(self) -> DateTime
pub fn to_date_time(self) -> DateTime
Convert to a date time
Trait Implementations
sourceimpl Clone for UtcDateTime
impl Clone for UtcDateTime
sourcefn clone(&self) -> UtcDateTime
fn clone(&self) -> UtcDateTime
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for UtcDateTime
impl Debug for UtcDateTime
sourceimpl PartialEq<UtcDateTime> for UtcDateTime
impl PartialEq<UtcDateTime> for UtcDateTime
sourcefn eq(&self, other: &UtcDateTime) -> bool
fn eq(&self, other: &UtcDateTime) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &UtcDateTime) -> bool
fn ne(&self, other: &UtcDateTime) -> bool
This method tests for !=.
impl Eq for UtcDateTime
impl StructuralEq for UtcDateTime
impl StructuralPartialEq for UtcDateTime
Auto Trait Implementations
impl RefUnwindSafe for UtcDateTime
impl Send for UtcDateTime
impl Sync for UtcDateTime
impl Unpin for UtcDateTime
impl UnwindSafe for UtcDateTime
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more