pub struct TzifFile {
pub version: Version,
pub v1: DataBlock,
pub v2_plus: Option<DataBlock>,
pub footer: Option<String>,
}Fields§
§version: Version§v1: DataBlock§v2_plus: Option<DataBlock>Implementations§
Source§impl TzifFile
impl TzifFile
Sourcepub fn interoperability_warnings(
&self,
) -> Result<Vec<InteroperabilityWarning>, TzifError>
pub fn interoperability_warnings( &self, ) -> Result<Vec<InteroperabilityWarning>, TzifError>
Returns interoperability warnings for readers with common legacy TZif limitations.
§Errors
Returns an error if the file is not structurally valid.
Source§impl TzifFile
impl TzifFile
Source§impl TzifFile
impl TzifFile
Source§impl TzifFile
impl TzifFile
pub fn has_leap_seconds(&self) -> bool
pub fn suggested_media_type(&self) -> &'static str
Sourcepub fn validate_for_media_type(
&self,
media_type: TzifMediaType,
) -> Result<(), TzdistError>
pub fn validate_for_media_type( &self, media_type: TzifMediaType, ) -> Result<(), TzdistError>
Validates that this file can be served as the requested media type.
§Errors
Returns an error if the file is invalid, or if leap seconds are present in
an application/tzif response.
Sourcepub fn validate_tzdist_truncation(
&self,
truncation: TzdistTruncation,
) -> Result<(), TzdistError>
pub fn validate_tzdist_truncation( &self, truncation: TzdistTruncation, ) -> Result<(), TzdistError>
Validates the structural TZif requirements for a TZDIST truncation response.
§Errors
Returns an error if the file is not version 2 or later, lacks required
transitions, has mismatched truncation boundaries, or does not use the
required -00 placeholder types.
Trait Implementations§
impl Eq for TzifFile
impl StructuralPartialEq for TzifFile
Auto Trait Implementations§
impl Freeze for TzifFile
impl RefUnwindSafe for TzifFile
impl Send for TzifFile
impl Sync for TzifFile
impl Unpin for TzifFile
impl UnsafeUnpin for TzifFile
impl UnwindSafe for TzifFile
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