pub enum OffsetResult<T> {
    Some(T),
    Ambiguous(T, T),
    None,
}
Expand description

This represents the possible types of errors when trying to find a local offset.

Variants

Some(T)

The date time is not ambiguous (exactly 1 is possible).

Ambiguous(T, T)

The date time is ambiguous (2 are possible).

None

The date time is invalid.

Implementations

Unwraps this OffsetResult assuming ambiguity is an error.

Unwraps this OffsetResult resolving ambiguity by taking the first result.

Unwraps this OffsetResult resolving ambiguity by taking the second result.

Turns this OffsetResult into an Option assuming ambiguity is an error.

Turns this OffsetResult into an Option resolving ambiguity by taking the first result.

Turns this OffsetResult into an Option resolving ambiguity by taking the second result.

Returns true if this OffsetResult is None.

Returns true if this OffsetResult is ambiguous.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.