Struct gpgme::Error
[−]
[src]
pub struct Error { // some fields omitted }
A type wrapping errors produced by GPG libraries.
Methods
impl Error
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.