Releases
v1.0.0
Functions refactor and stabilization
Properties
Properties
Definition
value
Returns the encapsulated value whether it's success or failure
is_success
Returns true if this instance represents successful outcome. In this case is_failure returns false.
is_failure
Returns true if this instance represents failed outcome. In this case is_success returns false
Functions
Functions
Definition
unwrap()
Returns the encapsulated value if this instance represents success or None if it is failure.
unwrap_or(failure_value)
Returns the encapsulated value if this instance represents success or the selected failure_value
if it is failure.
unwrap_or_throw()
Returns the encapsulated value if this instance represents success or throws the encapsulated exception if it is failure.
unwrap_or_else(on_failure)
Returns the encapsulated value if this instance represents success or execute the on_failure
function when it is failure.
handle(on_success,on_failure)
Returns itself and execute the on_success
function when the instance represemts success and the on_failure
function when it is failure.
map(transform)
Returns a transformed result applying transform
function applied to encapsulated value if this instance represents success or failure
You can’t perform that action at this time.