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.