Struct TimeZonePrecedingTransitions
pub struct TimeZonePrecedingTransitions<'t> { /* private fields */ }
An iterator over time zone transitions going backward in time.
This iterator is created by TimeZone::preceding.
Example: show the 5 previous time zone transitions
This shows how to find the 5 preceding time zone transitions (from a particular datetime) for a particular time zone:
use ;
let now: Zoned = "2024-12-31 18:25-05[US/Eastern]".parse?;
let transitions = now
.time_zone
.preceding
.take
.map
.;
assert_eq!;
# Ok::
Trait Implementations
impl<'t> Clone for TimeZonePrecedingTransitions<'t>
fn clone(&self) -> Self
impl<'t> Debug for TimeZonePrecedingTransitions<'t>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'t> FusedIterator for TimeZonePrecedingTransitions<'t>
impl<'t> Iterator for TimeZonePrecedingTransitions<'t>
type Item = TimeZoneTransition<'t>;fn next(&mut self) -> Option<TimeZoneTransition<'t>>
Auto Trait Implementations
impl<'t> Freeze for TimeZonePrecedingTransitions<'t>
impl<'t> RefUnwindSafe for TimeZonePrecedingTransitions<'t>
impl<'t> Send for TimeZonePrecedingTransitions<'t>
impl<'t> Sync for TimeZonePrecedingTransitions<'t>
impl<'t> Unpin for TimeZonePrecedingTransitions<'t>
impl<'t> UnsafeUnpin for TimeZonePrecedingTransitions<'t>
impl<'t> UnwindSafe for TimeZonePrecedingTransitions<'t>
Blanket Implementations
impl<I> IntoIterator for TimeZonePrecedingTransitions<'t>
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<T> Any for TimeZonePrecedingTransitions<'t>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for TimeZonePrecedingTransitions<'t>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for TimeZonePrecedingTransitions<'t>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for TimeZonePrecedingTransitions<'t>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for TimeZonePrecedingTransitions<'t>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for TimeZonePrecedingTransitions<'t>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for TimeZonePrecedingTransitions<'t>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for TimeZonePrecedingTransitions<'t>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for TimeZonePrecedingTransitions<'t>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>