pub struct TzDataIndexes { /* private fields */ }Expand description
Indexes of the tzdata file.
Implementations§
Source§impl TzDataIndexes
impl TzDataIndexes
Sourcepub fn new_android<R: Read>(reader: R, header: &TzDataHeader) -> Result<Self>
pub fn new_android<R: Read>(reader: R, header: &TzDataHeader) -> Result<Self>
Parse the indexes of the tzdata file of Android.
Sourcepub fn new_ohos<R: Read>(reader: R, header: &TzDataHeader) -> Result<Self>
pub fn new_ohos<R: Read>(reader: R, header: &TzDataHeader) -> Result<Self>
Parse the indexes of the tzdata file of HarmonyOS NEXT.
Sourcepub fn timezones(&self) -> &[TzDataIndex]
pub fn timezones(&self) -> &[TzDataIndex]
Get all timezones.
Sourcepub fn find_timezone(&self, timezone: &[u8]) -> Option<&TzDataIndex>
pub fn find_timezone(&self, timezone: &[u8]) -> Option<&TzDataIndex>
Find a timezone by name.
Sourcepub fn find_tzdata<R: Read + Seek>(
&self,
reader: R,
header: &TzDataHeader,
index: &TzDataIndex,
) -> Result<Vec<u8>>
pub fn find_tzdata<R: Read + Seek>( &self, reader: R, header: &TzDataHeader, index: &TzDataIndex, ) -> Result<Vec<u8>>
Retrieve a chunk of timezone data by the index.
Auto Trait Implementations§
impl Freeze for TzDataIndexes
impl RefUnwindSafe for TzDataIndexes
impl Send for TzDataIndexes
impl Sync for TzDataIndexes
impl Unpin for TzDataIndexes
impl UnwindSafe for TzDataIndexes
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