Either¶
- class guppylang.std.either.Either[source]¶
Represents a union of either a left or a right value.
- try_into_left() Option[L] [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[R] [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.