A class representing an Option that contains a value. This is the "Some" variant of the Option type, indicating that a value exists.
The type of the contained value
Creates a new Some instance with the provided value.
The non-null value to wrap
Applies a function to the contained value and returns the result. This method is essentially the same as Some::and_then() in Rust language.
The type of the value returned by the function
Function to apply to the contained value
The result of applying f to the contained value
Type guard that always returns false for Some instances.
Always false, indicating this Option contains a value
Gets the contained value directly. This is a convenience method for accessing the wrapped value.
The contained value
Type guard that always returns true for Some instances.
Always true, indicating this Option contains a value
Executes the Some handler function with the contained value.
The return type of the match functions
Object containing Some and None handler functions
The result of executing obj.Some with the contained value
Returns this Some instance, ignoring the provided function. Since this Option already contains a value, the alternative is not needed.
The type of the alternative Option (unused)
Function that returns an alternative Option (unused)
This Some instance cast to the appropriate type
Returns the contained value. This method never throws since Some always contains a value.
Returns the contained value, ignoring the provided default. Since this Option contains a value, the alternative is not needed.
The default value (unused)
Returns the contained value, ignoring the provided function. Since this Option contains a value, the alternative is not needed.
Function that returns a default value (unused)
Returns the contained value. This method never returns undefined since Some always contains a value.
A class representing an Option that contains a value. This is the "Some" variant of the Option type, indicating that a value exists.