Struct sgx_tstd::io::Error[][src]

pub struct Error { /* fields omitted */ }

The error type for I/O operations of the Read, Write, Seek, and associated traits.

Errors mostly originate from the underlying OS, but custom instances of Error can be created with crafted error messages and a particular value of ErrorKind.

Methods

impl Error
[src]

Creates a new I/O error from a known kind of error as well as an arbitrary error payload.

This function is used to generically create I/O errors which do not originate from the OS itself. The error argument is an arbitrary payload which will be contained in this Error.

Returns an error representing the last OS error which occurred.

This function reads the value of errno for the target platform (e.g. GetLastError on Windows) and will return a corresponding instance of Error for the error code.

Creates a new instance of an Error from a particular OS error code.

Returns the OS error that this error represents (if any).

If this Error was constructed via last_os_error or from_raw_os_error, then this function will return Some, otherwise it will return None.

Creates a new instance of an Error from a particular SGX error status.

Returns the SGX error that this error represents (if any).

If this Error was constructed via from_sgx_error or then this function will return Some, otherwise it will return None.

Returns a reference to the inner error wrapped by this error (if any).

If this Error was constructed via new then this function will return Some, otherwise it will return None.

Returns a mutable reference to the inner error wrapped by this error (if any).

If this Error was constructed via new then this function will return Some, otherwise it will return None.

Consumes the Error, returning its inner error (if any).

If this Error was constructed via new then this function will return Some, otherwise it will return None.

Returns the corresponding ErrorKind for this error.

Trait Implementations

impl From<NulError> for Error
[src]

Performs the conversion.

impl<W> From<IntoInnerError<W>> for Error
[src]

Performs the conversion.

impl Debug for Error
[src]

Formats the value using the given formatter. Read more

impl From<ErrorKind> for Error
[src]

Intended for use for errors not exposed to the user, where allocating onto the heap (for normal construction via Error::new) is too costly.

Performs the conversion.

impl From<sgx_status_t> for Error
[src]

Performs the conversion.

impl Display for Error
[src]

Formats the value using the given formatter. Read more

impl Error for Error
[src]

A short description of the error.

The lower-level cause of this error, if any.

Get the TypeId of self

Auto Trait Implementations

impl Send for Error

impl Sync for Error