pub struct DateTime(_);
Expand description
Representation of a date and time in the local time zone.
Implementations§
source§impl DateTime
impl DateTime
sourcepub fn new(date: (i32, u32, u32), time: (u32, u32, u32)) -> Result<Self>
pub fn new(date: (i32, u32, u32), time: (u32, u32, u32)) -> Result<Self>
Create a DateTime
from two tuples, one representing the date (year, month, day) and
the second representing the time (hour, minute, second).
Errors
Return an DateError::InvalidDate
if the values in the tuples are not appropriate for the
data types.
source§impl DateTime
impl DateTime
Trait Implementations§
source§impl Add<Duration> for DateTime
impl Add<Duration> for DateTime
source§impl Ord for DateTime
impl Ord for DateTime
source§impl PartialEq<DateTime> for DateTime
impl PartialEq<DateTime> for DateTime
source§impl PartialOrd<DateTime> for DateTime
impl PartialOrd<DateTime> for DateTime
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Sub<DateTime> for DateTime
impl Sub<DateTime> for DateTime
source§impl Sub<Duration> for DateTime
impl Sub<Duration> for DateTime
source§impl TryFrom<&str> for DateTime
impl TryFrom<&str> for DateTime
impl Copy for DateTime
impl Eq for DateTime
impl StructuralEq for DateTime
impl StructuralPartialEq for DateTime
Auto Trait Implementations§
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnwindSafe for DateTime
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<I> IntoResettable<String> for Iwhere
I: Into<String>,
impl<I> IntoResettable<String> for Iwhere I: Into<String>,
§fn into_resettable(self) -> Resettable<String>
fn into_resettable(self) -> Resettable<String>
Convert to the intended resettable type