Struct apint::Error
[−]
[src]
pub struct Error { /* fields omitted */ }
Represents an error that may occure upon using the ApInt
library.
All errors have a unique kind which also stores extra information for error reporting.
Besides that an Error
also stores a message and an optional additional annotation.
Methods
impl Error
[src]
fn kind(&self) -> &ErrorKind
[src]
Returns a reference to the kind of this Error
.
fn message(&self) -> &str
[src]
Returns the error message description of this Error
.
fn annotation(&self) -> Option<&str>
[src]
Returns the optional annotation of this Error
.
Trait Implementations
impl Debug for Error
[src]
impl Clone for Error
[src]
fn clone(&self) -> Error
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Error
[src]
fn eq(&self, __arg_0: &Error) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Error) -> bool
[src]
This method tests for !=
.
impl Eq for Error
[src]
impl<T> Into<Result<T>> for Error
[src]
fn into(self) -> Result<T>
[src]
Converts an Error
into a Result<T, Error>
.
This might be useful to prevent some parentheses spams
because it replaces Err(my_error)
with my_error.into()
.
On the other hand it might be an abuse of the trait ...
impl Display for Error
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more