some
Creates a new Option that contains a value.
This function explicitly wraps a value in an Option type.
Type Parameters
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.