class Failure(T)

Defined in:

try.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(value : Exception) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


[View source]
def err : Exception #

[View source]
def err? : Exception | Nil #

[View source]
def failed : Failure(T) #

[View source]
def failure? : Bool #

[View source]
def flat_map(&block : T -> Failure(U) | Success(U)) : Failure(U) | Success(U) forall U #

[View source]
def foreach(&block : T -> U) : Nil forall U #

[View source]
def get : T #

[View source]
def get? : T | Nil #

[View source]
def map(&block : T -> U) : Failure(U) | Success(U) forall U #

[View source]
def or(&block : Exception -> U) : Failure(T | U) | Success(T | U) forall U #

[View source]
def recover(&block : Exception -> T) : Failure(T) | Success(T) #

[View source]
def success? : Bool #

[View source]
def value #

[View source]