The result of an operation.
enum Result<T = (), E = Errno> {
Err(E),
Ok(T),
}| Name | Description |
|---|---|
| Err | The operation failed. |
| Ok | The operation succeeded. |
| Receiver | Name | Description |
|---|---|---|
self | chain | Applies a function to the success value (if any) and returns the result. |
self | ignore_ok | Replaces the success value (if any) by |
&self | is_err | Returns whether the operation failed. |
&self | is_ok | Returns whether the operation succeeded. |
self | map | If the success value is present, replaces it by the result of a function application. |
self | unwrap | Returns the success value or aborts if the operation did not succeed. |
| Name | Description |
|---|---|
| Copy | Objects that can safely be copied via |
| Eq | Objects that implement the binary |
| Hash | Objects that can be hashed. |