struct

CrtempResult::Result(T, E)

Inherits Struct < Value < Object

Simple generic Result type: either success with a value, or failure with an error

Constructors

new(success : Bool, value : T | Nil = nil, error : E | Nil = nil)
Source

Class methods

failure(error : E) : Result(T, E)
Source
success(value : T) : Result(T, E)
Source

Instance methods

and_then

Chain another Result-producing function

Source
error
Source
error!
Source
failure?
Source
map

Transform the success value

Source
success
Source
success?
Source
value
Source
value!
Source