Class: Ok<T>
A type used to express computations that can fail, it can be used for returning and propagating errors. This is a
type union with the variants Ok(T)
, representing success and containing a value, and Err(E)
, representing error
and containing an error value.
Typeparam
T The result's type.
Typeparam
E The error's type.
See
https://doc.rust-lang.org/std/result/index.html
Type parameters
Name |
---|
T |
Implements
IResult
<T
,any
>
Constructors
constructor
• new Ok<T
>(value
): Ok
<T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
value | T |
Returns
Ok
<T
>