[−][src]Struct uhr::DateTime
Fields
naive: NaiveDateTime
time_zone: Tz
Methods
impl<Tz> DateTime<Tz> where
Tz: TimeZone,
[src]
Tz: TimeZone,
pub fn new(
time_zone: Tz,
year: i32,
month: Month,
day: u8,
hour: u8,
minute: u8,
second: u8
) -> DateTime<Tz>
[src]
time_zone: Tz,
year: i32,
month: Month,
day: u8,
hour: u8,
minute: u8,
second: u8
) -> DateTime<Tz>
pub fn year(&self) -> i32
[src]
pub fn month(&self) -> Month
[src]
pub fn day(&self) -> u8
[src]
pub fn hour(&self) -> u8
[src]
pub fn minute(&self) -> u8
[src]
pub fn second(&self) -> u8
[src]
pub fn day_of_the_week(&self) -> DayOfTheWeek
[src]
pub fn from_timestamp(t: UnixTimestamp, time_zone: Tz) -> DateTime<Tz>
[src]
pub fn to_timestamp(&self) -> Result<UnixTimestamp, LocalTimeConversionError>
[src]
pub fn convert_time_zone<NewTz>(
&self,
new_time_zone: NewTz
) -> Result<DateTime<NewTz>, LocalTimeConversionError> where
NewTz: TimeZone,
[src]
&self,
new_time_zone: NewTz
) -> Result<DateTime<NewTz>, LocalTimeConversionError> where
NewTz: TimeZone,
impl<Tz> DateTime<Tz> where
Tz: UnambiguousTimeZone,
[src]
Tz: UnambiguousTimeZone,
pub fn to_unambiguous_timestamp(&self) -> UnixTimestamp
[src]
pub fn convert_unambiguous_time_zone<NewTz>(
&self,
new_time_zone: NewTz
) -> DateTime<NewTz> where
NewTz: TimeZone,
[src]
&self,
new_time_zone: NewTz
) -> DateTime<NewTz> where
NewTz: TimeZone,
Trait Implementations
impl<Tz> PartialEq<DateTime<Tz>> for DateTime<Tz> where
Tz: TimeZone + PartialEq<Tz>,
[src]
Tz: TimeZone + PartialEq<Tz>,
impl<Tz> Eq for DateTime<Tz> where
Tz: TimeZone + Eq,
[src]
Tz: TimeZone + Eq,
impl<Tz> Debug for DateTime<Tz> where
Tz: TimeZone + Debug,
[src]
Tz: TimeZone + Debug,
impl<Tz> Copy for DateTime<Tz> where
Tz: TimeZone + Copy,
[src]
Tz: TimeZone + Copy,
impl<Tz> From<UnixTimestamp> for DateTime<Tz> where
Tz: TimeZone + Default,
[src]
Tz: TimeZone + Default,
fn from(u: UnixTimestamp) -> DateTime<Tz>
[src]
impl<Tz> From<DateTime<Tz>> for UnixTimestamp where
Tz: UnambiguousTimeZone,
[src]
Tz: UnambiguousTimeZone,
fn from(datetime: DateTime<Tz>) -> UnixTimestamp
[src]
impl<Tz> Clone for DateTime<Tz> where
Tz: TimeZone + Clone,
[src]
Tz: TimeZone + Clone,
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self