Returns the option if it is a Some value, otherwise throws an error with
the provided message.
Returns None if the option is None or the predicate fn returns false,
otherwise returns the option.
Calls fn if the option is a Some value. Useful for checking the contents
of a Some while still being able to use it after in a chain.
Calls fn if the option is a None value. Useful for checking the contents
of a None while still being able to use it after in a chain.
Returns true if the option is a None value.
Returns true if the option is a Some value.
Returns true if the option is a Some value and fn returns true for the
contained value.
Returns an iterator over the possibly contained value.
Returns a string representation of the option for debugging purposes.
Returns
Noneif the option isNone, otherwise returnsother.