Skip to main content

TzifError

Enum TzifError 

Source
pub enum TzifError {
Show 40 variants UnexpectedEof { offset: usize, context: &'static str, }, InvalidMagic { offset: usize, }, InvalidVersion(u8), VersionMismatch { first: Version, second: Version, }, MissingFooterStart { offset: usize, }, MissingFooterEnd { offset: usize, }, InvalidFooterUtf8, TrailingData { offset: usize, }, CountTooLarge { field: &'static str, count: u32, }, DataBlockLengthOverflow { field: &'static str, }, InvalidDstIndicator { index: usize, value: u8, }, InvalidBooleanIndicator { field: &'static str, index: usize, value: u8, }, UnexpectedV2PlusData, MissingV2PlusData(Version), CountMismatch { field: &'static str, expected: usize, actual: usize, }, CountOverflow { field: &'static str, count: usize, }, EmptyLocalTimeTypes, EmptyDesignations, TooManyLocalTimeTypes(usize), InvalidTransitionType { index: usize, transition_type: u8, }, InvalidDesignationIndex { index: usize, designation_index: u8, }, Version1TransitionOutOfRange { index: usize, value: i64, }, Version1LeapSecondOutOfRange { index: usize, value: i64, }, TransitionTimesNotAscending { index: usize, }, UnterminatedDesignation { index: usize, designation_index: u8, }, InvalidUtcOffset { index: usize, }, InvalidDesignation { index: usize, designation: Vec<u8>, }, InvalidUtLocalIndicatorCombination { index: usize, }, FirstLeapSecondOccurrenceNegative { value: i64, }, LeapSecondOccurrencesNotAscending { index: usize, }, InvalidFirstLeapSecondCorrection { correction: i32, }, InvalidLeapSecondCorrection { index: usize, }, LeapSecondTruncationRequiresVersion4 { version: Version, }, LeapSecondExpirationRequiresVersion4 { version: Version, }, LeapSecondOccurrenceNotAtMonthEnd { index: usize, }, InvalidFooterAscii, InvalidFooterControlByte, FooterExtensionRequiresVersion3 { version: Version, }, InvalidFooterSyntax, FooterInconsistentWithLastTransition,
}

Variants§

§

UnexpectedEof

Fields

§offset: usize
§context: &'static str
§

InvalidMagic

Fields

§offset: usize
§

InvalidVersion(u8)

§

VersionMismatch

Fields

§first: Version
§second: Version
§

MissingFooterStart

Fields

§offset: usize
§

MissingFooterEnd

Fields

§offset: usize
§

InvalidFooterUtf8

§

TrailingData

Fields

§offset: usize
§

CountTooLarge

Fields

§field: &'static str
§count: u32
§

DataBlockLengthOverflow

Fields

§field: &'static str
§

InvalidDstIndicator

Fields

§index: usize
§value: u8
§

InvalidBooleanIndicator

Fields

§field: &'static str
§index: usize
§value: u8
§

UnexpectedV2PlusData

§

MissingV2PlusData(Version)

§

CountMismatch

Fields

§field: &'static str
§expected: usize
§actual: usize
§

CountOverflow

Fields

§field: &'static str
§count: usize
§

EmptyLocalTimeTypes

§

EmptyDesignations

§

TooManyLocalTimeTypes(usize)

§

InvalidTransitionType

Fields

§index: usize
§transition_type: u8
§

InvalidDesignationIndex

Fields

§index: usize
§designation_index: u8
§

Version1TransitionOutOfRange

Fields

§index: usize
§value: i64
§

Version1LeapSecondOutOfRange

Fields

§index: usize
§value: i64
§

TransitionTimesNotAscending

Fields

§index: usize
§

UnterminatedDesignation

Fields

§index: usize
§designation_index: u8
§

InvalidUtcOffset

Fields

§index: usize
§

InvalidDesignation

Fields

§index: usize
§designation: Vec<u8>
§

InvalidUtLocalIndicatorCombination

Fields

§index: usize
§

FirstLeapSecondOccurrenceNegative

Fields

§value: i64
§

LeapSecondOccurrencesNotAscending

Fields

§index: usize
§

InvalidFirstLeapSecondCorrection

Fields

§correction: i32
§

InvalidLeapSecondCorrection

Fields

§index: usize
§

LeapSecondTruncationRequiresVersion4

Fields

§version: Version
§

LeapSecondExpirationRequiresVersion4

Fields

§version: Version
§

LeapSecondOccurrenceNotAtMonthEnd

Fields

§index: usize
§

InvalidFooterAscii

§

InvalidFooterControlByte

§

FooterExtensionRequiresVersion3

Fields

§version: Version
§

InvalidFooterSyntax

§

FooterInconsistentWithLastTransition

Trait Implementations§

Source§

impl Debug for TzifError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for TzifError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for TzifError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<TzifError> for TzdistError

Source§

fn from(source: TzifError) -> Self

Converts to this type from the input type.
Source§

impl From<TzifError> for TzifBuildError

Source§

fn from(source: TzifError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for TzifError

Source§

fn eq(&self, other: &TzifError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for TzifError

Source§

impl StructuralPartialEq for TzifError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.