|
Wasmtime
|
Fallible result type used for Wasmtime. More...
#include <error.hh>
Public Member Functions | |
| Result (T t) | |
Creates a Result from its successful value. | |
| Result (E e) | |
Creates a Result from an error value. | |
| operator bool () const | |
Returns true if this result is a success, false if it's an error. | |
| E && | err () |
| Returns the error, if present, aborts if this is not an error. | |
| const E && | err () const |
| Returns the error, if present, aborts if this is not an error. | |
| T && | ok () |
| Returns the success, if present, aborts if this is an error. | |
| const T && | ok () const |
| Returns the success, if present, aborts if this is an error. | |
| T & | ok_ref () |
| Returns the success, if present, aborts if this is an error. | |
| const T & | ok_ref () const |
| Returns the success, if present, aborts if this is an error. | |
| E & | err_ref () |
| Returns the error, if present, aborts if this is not an error. | |
| const E & | err_ref () const |
| Returns the error, if present, aborts if this is not an error. | |
| T | unwrap () |
| Returns the success, if present, aborts if this is an error. | |
Fallible result type used for Wasmtime.
This type is used as the return value of many methods in the Wasmtime API. This behaves similarly to Rust's Result<T, E> and will be replaced with a C++ standard when it exists.