Functions
some
some<
T
>(value
):Option
<T
>
Creates a new Option that contains a value.
This function explicitly wraps a value in an Option type.
Type Parameters
Type Parameter | Description |
---|---|
T | The type of the contained value. |
Parameters
Parameter | Type | Description |
---|---|---|
value | T | The value to wrap in an Option. |
Returns
Option
<T
>
An Option containing the provided value.
Example
Wrapping a value in an Option
.