Represents an absence of value (None).
None
Static
Singleton instance of None for efficiency.
Returns None since there is no value to filter.
(Unused) A condition to check.
Maps over the value expecting another Option<U>, but since None has no value, it always returns None.
Option<U>
The return type wrapped in an Option<U>.
Calls ifNone, since None contains no value.
ifNone
The return type.
Function to execute when None.
(Unused) Function for Some<T>.
Some<T>
Returns the provided default value since None contains nothing.
The fallback value.
Checks if this is None, meaning no value is present.
true
Checks if this is Some<T>, meaning it contains a value.
false
Maps over the value, but since None has no value, it always returns None.
Returns the provided alternative Option<U> since None contains nothing.
The alternative Option<U> to return.
Creates an instance of Some<T> if a value is present, otherwise returns None.
The value to wrap.
Represents an absence of value (
None
).