Enum nullable_result::NullableResult[][src]

pub enum NullableResult<T, E> {
    Ok(T),
    Err(E),
    None,
}

Variants

Ok(T)

Tuple Fields of Ok

0: T
Err(E)

Tuple Fields of Err

0: E
None

Implementations

Panics if it’s not Ok, otherwise returns the contained value.

Returns the contained value if it’s Ok, returns item otherwise.

Returns the contained value if it’s Ok, otherwise, it calls f and forwards its return value.

Returns an Option<T> consuming self, returns None if the NullableResult contains Err.

Return an Option<Result<T, E>> consuming self.

Return a Result<Option<T>, E> consuming self.

Returns a Result<T, E>, returns the provided err if the NullableResult contains None

Returns a Result<T, E>, if the NullableResult contains Ok or Err, the value is returned, otherwise, returns the result of f.

Maps to a NullableResult with a different ok type.

Maps to a NullableResult with a different err type.

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

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Creates a value from an iterator. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. 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

Performs the conversion.

Performs the conversion.

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)

recently added

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.