Enum cursive::reexports::time::error::Error [−]
#[non_exhaustive]
pub enum Error {
ConversionRange(ConversionRange),
ComponentRange(ComponentRange),
IndeterminateOffset(IndeterminateOffset),
Format(Format),
InvalidFormatDescription(InvalidFormatDescription),
DifferentVariant(DifferentVariant),
}
Expand description
A unified error type for anything returned by a method in the time crate.
This can be used when you either don’t know or don’t care about the exact error returned.
Result<_, time::Error>
(or its alias time::Result<_>
) will work in these situations.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
ConversionRange(ConversionRange)
Tuple Fields
ComponentRange(ComponentRange)
Tuple Fields
IndeterminateOffset(IndeterminateOffset)
Tuple Fields
Format(Format)
Tuple Fields
0: Format
InvalidFormatDescription(InvalidFormatDescription)
Tuple Fields
DifferentVariant(DifferentVariant)
Tuple Fields
Trait Implementations
impl From<ComponentRange> for Error
impl From<ComponentRange> for Error
pub fn from(original: ComponentRange) -> Error
pub fn from(original: ComponentRange) -> Error
Performs the conversion.
impl From<ConversionRange> for Error
impl From<ConversionRange> for Error
pub fn from(err: ConversionRange) -> Error
pub fn from(err: ConversionRange) -> Error
Performs the conversion.
impl From<DifferentVariant> for Error
impl From<DifferentVariant> for Error
pub fn from(err: DifferentVariant) -> Error
pub fn from(err: DifferentVariant) -> Error
Performs the conversion.
impl From<IndeterminateOffset> for Error
impl From<IndeterminateOffset> for Error
pub fn from(err: IndeterminateOffset) -> Error
pub fn from(err: IndeterminateOffset) -> Error
Performs the conversion.
impl From<InvalidFormatDescription> for Error
impl From<InvalidFormatDescription> for Error
pub fn from(original: InvalidFormatDescription) -> Error
pub fn from(original: InvalidFormatDescription) -> Error
Performs the conversion.
impl TryFrom<Error> for ConversionRange
impl TryFrom<Error> for ConversionRange
type Error = DifferentVariant
type Error = DifferentVariant
The type returned in the event of a conversion error.
pub fn try_from(
err: Error
) -> Result<ConversionRange, <ConversionRange as TryFrom<Error>>::Error>
pub fn try_from(
err: Error
) -> Result<ConversionRange, <ConversionRange as TryFrom<Error>>::Error>
Performs the conversion.
impl TryFrom<Error> for InvalidFormatDescription
impl TryFrom<Error> for InvalidFormatDescription
type Error = DifferentVariant
type Error = DifferentVariant
The type returned in the event of a conversion error.
pub fn try_from(
err: Error
) -> Result<InvalidFormatDescription, <InvalidFormatDescription as TryFrom<Error>>::Error>
pub fn try_from(
err: Error
) -> Result<InvalidFormatDescription, <InvalidFormatDescription as TryFrom<Error>>::Error>
Performs the conversion.
impl TryFrom<Error> for IndeterminateOffset
impl TryFrom<Error> for IndeterminateOffset
type Error = DifferentVariant
type Error = DifferentVariant
The type returned in the event of a conversion error.
pub fn try_from(
err: Error
) -> Result<IndeterminateOffset, <IndeterminateOffset as TryFrom<Error>>::Error>
pub fn try_from(
err: Error
) -> Result<IndeterminateOffset, <IndeterminateOffset as TryFrom<Error>>::Error>
Performs the conversion.
impl TryFrom<Error> for DifferentVariant
impl TryFrom<Error> for DifferentVariant
type Error = DifferentVariant
type Error = DifferentVariant
The type returned in the event of a conversion error.
pub fn try_from(
err: Error
) -> Result<DifferentVariant, <DifferentVariant as TryFrom<Error>>::Error>
pub fn try_from(
err: Error
) -> Result<DifferentVariant, <DifferentVariant as TryFrom<Error>>::Error>
Performs the conversion.
impl TryFrom<Error> for ComponentRange
impl TryFrom<Error> for ComponentRange
type Error = DifferentVariant
type Error = DifferentVariant
The type returned in the event of a conversion error.
pub fn try_from(
err: Error
) -> Result<ComponentRange, <ComponentRange as TryFrom<Error>>::Error>
pub fn try_from(
err: Error
) -> Result<ComponentRange, <ComponentRange as TryFrom<Error>>::Error>
Performs the conversion.