Struct chrono_simpletz::UtcZst [−][src]
Represent Fixed Timezone with zero sized type and const generics.
Implementations
impl<const HOUR: i32, const MINUTE: u32> UtcZst<HOUR, MINUTE>
[src]
pub const OFFSET_SECS: i32
[src]
Gets the offset seconds. This is used to get FixedOffset
.
pub const IS_IN_VALID_RANGE: bool
[src]
Checks whether the HOUR
and MINUTE
is in valid range(-23 <= HOUR <= 23 & MINUTE < 60)
. This does not check whether the timezone is known.
pub const fn new() -> Self
[src]
Creates new UtcZst
Trait Implementations
impl<const HOUR: i32, const MINUTE: u32> Clone for UtcZst<HOUR, MINUTE>
[src]
impl<const HOUR: i32, const MINUTE: u32> Copy for UtcZst<HOUR, MINUTE>
[src]
impl<const HOUR: i32, const MINUTE: u32> Debug for UtcZst<HOUR, MINUTE>
[src]
impl<const HOUR: i32, const MINUTE: u32> Default for UtcZst<HOUR, MINUTE>
[src]
impl<const HOUR: i32, const MINUTE: u32> Display for UtcZst<HOUR, MINUTE>
[src]
impl<const HOUR: i32, const MINUTE: u32> Eq for UtcZst<HOUR, MINUTE>
[src]
impl<const HOUR: i32, const MINUTE: u32> Hash for UtcZst<HOUR, MINUTE>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<const HOUR: i32, const MINUTE: u32> Offset for UtcZst<HOUR, MINUTE>
[src]
fn fix(&self) -> FixedOffset
[src]
impl<const HOUR: i32, const MINUTE: u32> Ord for UtcZst<HOUR, MINUTE>
[src]
fn cmp(&self, other: &UtcZst<HOUR, MINUTE>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<const HOUR: i32, const MINUTE: u32> PartialEq<UtcZst<HOUR, MINUTE>> for UtcZst<HOUR, MINUTE>
[src]
fn eq(&self, other: &UtcZst<HOUR, MINUTE>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<const HOUR: i32, const MINUTE: u32> PartialOrd<UtcZst<HOUR, MINUTE>> for UtcZst<HOUR, MINUTE>
[src]
fn partial_cmp(&self, other: &UtcZst<HOUR, MINUTE>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<const HOUR: i32, const MINUTE: u32> StructuralEq for UtcZst<HOUR, MINUTE>
[src]
impl<const HOUR: i32, const MINUTE: u32> StructuralPartialEq for UtcZst<HOUR, MINUTE>
[src]
impl<const HOUR: i32, const MINUTE: u32> TimeZone for UtcZst<HOUR, MINUTE>
[src]
type Offset = Self
An associated offset type.
This type is used to store the actual offset in date and time types.
The original TimeZone
value can be recovered via TimeZone::from_offset
. Read more
fn from_offset(offset: &Self::Offset) -> Self
[src]
fn offset_from_local_date(
&self,
_local: &NaiveDate
) -> LocalResult<Self::Offset>
[src]
&self,
_local: &NaiveDate
) -> LocalResult<Self::Offset>
fn offset_from_local_datetime(
&self,
_local: &NaiveDateTime
) -> LocalResult<Self::Offset>
[src]
&self,
_local: &NaiveDateTime
) -> LocalResult<Self::Offset>
fn offset_from_utc_date(&self, _utc: &NaiveDate) -> Self::Offset
[src]
fn offset_from_utc_datetime(&self, _utc: &NaiveDateTime) -> Self::Offset
[src]
pub fn ymd(&self, year: i32, month: u32, day: u32) -> Date<Self>
[src]
pub fn ymd_opt(
&self,
year: i32,
month: u32,
day: u32
) -> LocalResult<Date<Self>>
[src]
&self,
year: i32,
month: u32,
day: u32
) -> LocalResult<Date<Self>>
pub fn yo(&self, year: i32, ordinal: u32) -> Date<Self>
[src]
pub fn yo_opt(&self, year: i32, ordinal: u32) -> LocalResult<Date<Self>>
[src]
pub fn isoywd(&self, year: i32, week: u32, weekday: Weekday) -> Date<Self>
[src]
pub fn isoywd_opt(
&self,
year: i32,
week: u32,
weekday: Weekday
) -> LocalResult<Date<Self>>
[src]
&self,
year: i32,
week: u32,
weekday: Weekday
) -> LocalResult<Date<Self>>
pub fn timestamp(&self, secs: i64, nsecs: u32) -> DateTime<Self>
[src]
pub fn timestamp_opt(
&self,
secs: i64,
nsecs: u32
) -> LocalResult<DateTime<Self>>
[src]
&self,
secs: i64,
nsecs: u32
) -> LocalResult<DateTime<Self>>
pub fn timestamp_millis(&self, millis: i64) -> DateTime<Self>
[src]
pub fn timestamp_millis_opt(&self, millis: i64) -> LocalResult<DateTime<Self>>
[src]
pub fn timestamp_nanos(&self, nanos: i64) -> DateTime<Self>
[src]
pub fn datetime_from_str(
&self,
s: &str,
fmt: &str
) -> Result<DateTime<Self>, ParseError>
[src]
&self,
s: &str,
fmt: &str
) -> Result<DateTime<Self>, ParseError>
pub fn from_local_date(&self, local: &NaiveDate) -> LocalResult<Date<Self>>
[src]
pub fn from_local_datetime(
&self,
local: &NaiveDateTime
) -> LocalResult<DateTime<Self>>
[src]
&self,
local: &NaiveDateTime
) -> LocalResult<DateTime<Self>>
pub fn from_utc_date(&self, utc: &NaiveDate) -> Date<Self>
[src]
pub fn from_utc_datetime(&self, utc: &NaiveDateTime) -> DateTime<Self>
[src]
Auto Trait Implementations
impl<const HOUR: i32, const MINUTE: u32> RefUnwindSafe for UtcZst<HOUR, MINUTE>
impl<const HOUR: i32, const MINUTE: u32> Send for UtcZst<HOUR, MINUTE>
impl<const HOUR: i32, const MINUTE: u32> Sync for UtcZst<HOUR, MINUTE>
impl<const HOUR: i32, const MINUTE: u32> Unpin for UtcZst<HOUR, MINUTE>
impl<const HOUR: i32, const MINUTE: u32> UnwindSafe for UtcZst<HOUR, MINUTE>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,