Represents a value that is present (Some<T>).
Some<T>
The type of the contained value.
Creates an instance of Some<T> with a valid value.
The contained value.
Returns Some<T> if the predicate is met, otherwise returns None.
None
A condition to check.
Transforms the contained value using a function that returns an Option<U>.
Option<U>
The return type wrapped in an Option<U>.
The transformation function.
fn
Executes the ifSome function with the contained value.
ifSome
The return type.
(Unused) Function to call if None.
Function to call with the value if Some<T>.
Retrieves the contained value, ignoring the provided default.
(Unused) A fallback value.
Checks if this is None, meaning no value is present.
false
Checks if this is a Some<T>, meaning it contains a valid value.
true
Transforms the contained value using the provided function.
The return type after transformation.
Some<U>
Returns the current Some<T>, ignoring the provided alternative.
(Unused) An alternative Option<T>.
Option<T>
Static
Creates an instance of Some<T> if a value is present, otherwise returns None.
The value to wrap.
Represents a value that is present (
Some<T>
).