Enum lrs::result::Result

The result of an operation.

Syntax

enum Result<T = (), E = Errno> {
    Err(E),
    Ok(T),
}

Variants

NameDescription
Err

The operation failed.

Ok

The operation succeeded.

Methods

ReceiverNameDescription
selfchain

Applies a function to the success value (if any) and returns the result.

selfignore_ok

Replaces the success value (if any) by ().

&selfis_err

Returns whether the operation failed.

&selfis_ok

Returns whether the operation succeeded.

selfmap

If the success value is present, replaces it by the result of a function application.

selfunwrap

Returns the success value or aborts if the operation did not succeed.

Trait implementations

NameDescription
Copy

Objects that can safely be copied via memcpy.

Eq

Objects that implement the binary == and != operators.

Hash

Objects that can be hashed.