Struct gcrypt::Error
[−]
[src]
pub struct Error { /* fields omitted */ }
A type wrapping errors produced by GPG libraries.
Methods
impl Error
[src]
fn new(err: u32) -> Error
Creates a new error from a raw error value.
fn raw(&self) -> u32
Returns the raw error value that this error wraps.
fn from_source(source: u32, code: u32) -> Error
Creates a new error from an error source and an error code.
fn from_code(code: u32) -> Error
Creates a new error from an error code using the default
error source GPG_ERR_SOURCE_USER_1
.
fn last_os_error() -> Error
Returns an error representing the last OS error that occurred.
fn from_errno(code: i32) -> Error
Creates a new error from an OS error code.
fn to_errno(&self) -> i32
Returns the OS error that this error represents.
fn code(&self) -> u32
Returns the error code.
fn source(&self) -> Option<&'static str>
Returns a description of the source of the error as a UTF-8 string.
fn raw_source(&self) -> Option<&'static [u8]>
Returns a description of the source of the error as a slice of bytes.
fn description(&self) -> Cow<'static, str>
Returns a printable description of the error.
fn raw_description(&self) -> Cow<'static, [u8]>
Returns a description of the error as a slice of bytes.
Trait Implementations
impl Display for Error
[src]
impl Eq for Error
[src]
impl Copy for Error
[src]
impl From<NulError> for Error
[src]
impl From<Error> for Error
[src]
impl PartialEq<Error> for Error
[src]
fn eq(&self, __arg_0: &Error) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Error) -> bool
This method tests for !=
.
impl Error for Error
[src]
fn description(&self) -> &str
impl Debug for Error
[src]
impl Hash for Error
[src]
fn hash<__H>(&self, __arg_0: &mut __H) where
__H: Hasher,
__H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for Error
[src]
fn clone(&self) -> Error
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more