Struct std::old_io::IoErrorUnstable [-] [+] [src]

pub struct IoError {
    pub kind: IoErrorKind,
    pub desc: &'static str,
    pub detail: Option<String>,
}

The type passed to I/O condition handlers to indicate error

FIXME

Is something like this sufficient? It's kind of archaic

Fields

kind

An enumeration which can be matched against for determining the flavor of error.

desc

A human-readable description about the error

detail

Detailed information about this error, not always available

Methods

impl IoError

fn from_errno(errno: i32, detail: bool) -> IoError

Convert an errno value into an IoError.

If detail is true, the detail field of the IoError struct is filled with an allocated string describing the error in more detail, retrieved from the operating system.

fn last_error() -> IoError

Retrieve the last error to occur as a (detailed) IoError.

This uses the OS errno, and so there should not be any task descheduling or migration (other than that performed by the operating system) between the call(s) for which errors are being checked and the call of this function.

Trait Implementations

impl FromError<NulError> for IoError

fn from_error(_: NulError) -> IoError

impl Display for IoError

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

impl Error for IoError

fn description(&self) -> &str

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

Derived Implementations

impl Debug for IoError

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

impl Clone for IoError

fn clone(&self) -> IoError

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

impl Eq for IoError

impl PartialEq for IoError

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

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