pub struct Error { /* private fields */ }Expand description
A detailed error reported as part of an ErrorStack.
Implementations§
Source§impl Error
impl Error
Sourcepub fn get() -> Option<Error>
pub fn get() -> Option<Error>
Pops the first error off the OpenSSL error stack.
This corresponds to ERR_get_error_line_data.
Sourcepub fn put(&self)
pub fn put(&self)
Pushes the error back onto the OpenSSL error stack.
This corresponds to ERR_put_error.
Sourcepub fn code(&self) -> u32
pub fn code(&self) -> u32
Returns a raw OpenSSL packed error code for this error, which can’t be reliably compared to any error constant.
Use Error::library_code() and Error::reason_code() instead.
Packed error codes are different than SSL error codes.
Sourcepub fn library(&self) -> Option<&'static str>
pub fn library(&self) -> Option<&'static str>
Returns the name of the library reporting the error, if available.
Sourcepub fn library_code(&self) -> i32
pub fn library_code(&self) -> i32
Returns the raw OpenSSL error constant for the library reporting the error (ERR_LIB_{name}).
Error reason codes are not globally unique, but scoped to each library.
Sourcepub fn function(&self) -> Option<&'static str>
pub fn function(&self) -> Option<&'static str>
Returns None. Boring doesn’t use function codes.
Sourcepub fn reason_code(&self) -> i32
pub fn reason_code(&self) -> i32
Returns library-specific reason code corresponding to some of the {lib}_R_{reason} constants.
Reason codes are ambiguous, and different libraries reuse the same numeric values for different errors.
For ERR_LIB_SYS the reason code is errno. ERR_LIB_USER can use any values.
Other libraries may use ERR_R_* or their own codes.
Sourcepub fn file(&self) -> &'static str
pub fn file(&self) -> &'static str
Returns the name of the source file which encountered the error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
impl Send for Error
impl Sync for Error
Auto Trait Implementations§
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)