Either¶
- class guppylang.std.either.Either[source]¶
Represents a union of either a left or a right value.
- __type_params__ = (L, R)¶
- try_into_left() Option[source]¶
Returns the wrapped value if self is a left value, or nothing otherwise.
This operation is only allowed if the right variant wraps a droppable type.
- try_into_right() Option[source]¶
Returns the wrapped value if self is a right value, or nothing otherwise.
This operation is only allowed if the left variant wraps a droppable type.