Safely wraps a value that might be null or undefined in an Option. Creates Some if the value is defined, None otherwise.
The type of the value
The value to wrap (might be null/undefined)
Some(value) if value is defined, None otherwise
Creates an Option from any value. Alias for Option function.
The value to wrap
Returns a None instance. Alias for None function.
The type that would be contained if this was a Some
A None instance
Safely wraps a value that might be null or undefined in an Option. Creates Some if the value is defined, None otherwise.