module Try::Interface

Defined in:

try.cr

Instance Method Summary

Instance Method Detail

abstract def err : Exception #

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

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

[View source]
abstract def failure? : Bool #

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

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

[View source]
abstract def get : T #

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

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

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

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

[View source]
abstract def success? : Bool #

[View source]