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]
impl Error
Public getters for Error
.
===========================================================================
pub fn kind(&self) -> &ErrorKind
[src]
pub fn kind(&self) -> &ErrorKind
Returns a reference to the kind of this Error
.
pub fn message(&self) -> &str
[src]
pub fn message(&self) -> &str
Returns the error message description of this Error
.
pub fn annotation(&self) -> Option<&str>
[src]
pub fn annotation(&self) -> Option<&str>
Returns the optional annotation of this Error
.
Trait Implementations
impl Debug for Error
[src]
impl Debug for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Error
[src]
impl Clone for Error
fn clone(&self) -> Error
[src]
fn clone(&self) -> Error
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Error
[src]
impl PartialEq for Error
fn eq(&self, other: &Error) -> bool
[src]
fn eq(&self, other: &Error) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Error) -> bool
[src]
fn ne(&self, other: &Error) -> bool
This method tests for !=
.
impl Eq for Error
[src]
impl Eq for Error
impl Hash for Error
[src]
impl Hash for Error
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T> Into<Result<T>> for Error
[src]
impl<T> Into<Result<T>> for Error
fn into(self) -> Result<T>
[src]
fn into(self) -> Result<T>
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]
impl Display for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Error for Error
[src]
impl Error for Error