Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
therapy
main
Therapy
ArrayType
BaseType
BoolType
Check
EnumType
Error
FloatType
IntType
ObjectType
OptionalType
ParseContext
PathType
Result
Failure
Success
StringType
SubContext
TupleType
Generated using Crystal 1.16.3
2026-01-28 23:09:56 UTC
struct
Therapy::
Result::
Failure(T)
Therapy::Result::Failure(T)
Therapy::Result(T)
Struct
Value
Object
Defined in:
therapy/result.cr
Constructors
.new
(errors : Array(Therapy::Error))
Class Method Summary
.with_msg
(err_msg : String) : Failure(T)
Instance Method Summary
#errors
: Array(Therapy::Error)
#failure?
: Bool
#success?
: Bool
#value
: T
Instance methods inherited from struct
Therapy::Result(T)
errors : Array(Therapy::Error)
errors
,
failure? : Bool
failure?
,
initialize
initialize
,
map(&block : T -> Y) : Result(Y) forall Y
map
,
success? : Bool
success?
,
valid? : Bool
valid?
,
value : T
value
Constructor methods inherited from struct
Therapy::Result(T)
new
new
Constructor Detail
def self.
new
(errors : Array(
Therapy::Error
))
#
[
View source
]
Class Method Detail
def self.
with_msg
(err_msg : String) :
Failure
(T)
#
[
View source
]
Instance Method Detail
def
errors
: Array(
Therapy::Error
)
#
[
View source
]
def
failure?
: Bool
#
[
View source
]
def
success?
: Bool
#
[
View source
]
def
value
: T
#
[
View source
]