pub(super) struct AlternateTime {
pub(super) std: LocalTimeType,
pub(super) dst: LocalTimeType,
dst_start: RuleDay,
dst_start_time: i32,
dst_end: RuleDay,
dst_end_time: i32,
}
Expand description
Transition rule representing alternate local time types
Fields§
§std: LocalTimeType
Local time type for standard time
dst: LocalTimeType
Local time type for Daylight Saving Time
dst_start: RuleDay
Start day of Daylight Saving Time
dst_start_time: i32
Local start day time of Daylight Saving Time, in seconds
dst_end: RuleDay
End day of Daylight Saving Time
dst_end_time: i32
Local end day time of Daylight Saving Time, in seconds
Implementations§
source§impl AlternateTime
impl AlternateTime
sourceconst fn new(
std: LocalTimeType,
dst: LocalTimeType,
dst_start: RuleDay,
dst_start_time: i32,
dst_end: RuleDay,
dst_end_time: i32,
) -> Result<Self, Error>
const fn new( std: LocalTimeType, dst: LocalTimeType, dst_start: RuleDay, dst_start_time: i32, dst_end: RuleDay, dst_end_time: i32, ) -> Result<Self, Error>
Construct a transition rule representing alternate local time types
sourcefn find_local_time_type(&self, unix_time: i64) -> Result<&LocalTimeType, Error>
fn find_local_time_type(&self, unix_time: i64) -> Result<&LocalTimeType, Error>
Find the local time type associated to the alternate transition rule at the specified Unix time in seconds
fn find_local_time_type_from_local( &self, local_time: i64, current_year: i32, ) -> Result<MappedLocalTime<LocalTimeType>, Error>
Trait Implementations§
source§impl Clone for AlternateTime
impl Clone for AlternateTime
source§fn clone(&self) -> AlternateTime
fn clone(&self) -> AlternateTime
Returns a copy 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 Debug for AlternateTime
impl Debug for AlternateTime
source§impl From<AlternateTime> for TransitionRule
impl From<AlternateTime> for TransitionRule
source§fn from(inner: AlternateTime) -> Self
fn from(inner: AlternateTime) -> Self
Converts to this type from the input type.
source§impl PartialEq for AlternateTime
impl PartialEq for AlternateTime
impl Copy for AlternateTime
impl Eq for AlternateTime
impl StructuralPartialEq for AlternateTime
Auto Trait Implementations§
impl Freeze for AlternateTime
impl RefUnwindSafe for AlternateTime
impl Send for AlternateTime
impl Sync for AlternateTime
impl Unpin for AlternateTime
impl UnwindSafe for AlternateTime
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)