Struct whiteread::reader::OwnedError
[−]
[src]
pub struct OwnedError { /* fields omitted */ }
An owned version of the error with lineinfo.
It can be created from the BorrowedError
using .to_owned()
method From::from
or automatically with try!
or ?
.
This type, in contrary to BorrowedError
, can be used as a return value
(ie. OwnedResult
). Because of that, it's also
exported as ReaderError
in the crate's root.
See the BorrowedError
for more docs.
Methods
impl OwnedError
[src]
fn into_inner(self) -> Error
Obtains an underlying error, by stripping the location info.
You can also use .as_ref()
to get a reference to it.
fn location(&self) -> Option<(u64, usize)>
Obtains a location (line, column) of the error.
Return value
The tuple contains a 1-indexed number of line and a 1-indexed number of column.
None
is returned when the location info is not available,
eg. when IO error happens.
Trait Implementations
impl Debug for OwnedError
[src]
impl StdError for OwnedError
[src]
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&StdError>
The lower-level cause of this error, if any. Read more
impl AsRef<Error> for OwnedError
[src]
impl From<Error> for OwnedError
[src]
fn from(e: Error) -> OwnedError
Performs the conversion.
impl<'a> From<BorrowedError<'a>> for OwnedError
[src]
fn from(e: BorrowedError<'a>) -> OwnedError
Performs the conversion.