Struct std::io::ErrorUnstable [-] [+] [src]

pub struct Error {
    // some 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

fn new(kind: ErrorKind, description: &'static str, detail: Option<String>) -> Error

Creates a new custom error from a specified kind/description/detail.

fn last_os_error() -> 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.

fn from_os_error(code: i32) -> Error

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

fn kind(&self) -> ErrorKind

Return the corresponding ErrorKind for this error.

fn description(&self) -> &str

Returns a short description for this error message

fn detail(&self) -> Option<String>

Returns a detailed error message for this error (if one is available)

Trait Implementations

impl FromError<NulError> for Error

fn from_error(_: NulError) -> Error

impl<W> FromError<IntoInnerError<W>> for Error

fn from_error(iie: IntoInnerError<W>) -> Error

impl Display for Error

fn fmt(&self, fmt: &mut Formatter) -> Result

impl StdError for Error

fn description(&self) -> &str

fn cause(&self) -> Option<&Error>

Derived Implementations

impl Debug for Error

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for Error

fn clone(&self) -> Error

fn clone_from(&mut self, source: &Self)

impl Eq for Error

impl PartialEq for Error

fn eq(&self, __arg_0: &Error) -> bool

fn ne(&self, __arg_0: &Error) -> bool