Value returns the underlying value and true for a [Some] variant, or the zero value and false for a [None] variant.
()
| 120 | // Value returns the underlying value and true for a [Some] variant, or the |
| 121 | // zero value and false for a [None] variant. |
| 122 | func (o Option[T]) Value() (T, bool) { |
| 123 | return o.value, o.present |
| 124 | } |
| 125 | |
| 126 | // Expect returns the underlying value for a [Some] variant, or panics with the |
| 127 | // provided message for a [None] variant. |
no outgoing calls