pub struct ErrState { /* private fields */ }Expand description
A snapshot of the thread-local error queue, suitable for moving across thread boundaries.
Use this when an OpenSSL error occurs on a worker thread and needs to be reported to the caller thread.
Implementations§
Source§impl ErrState
impl ErrState
Sourcepub fn capture() -> Option<Self>
pub fn capture() -> Option<Self>
Capture the current thread’s error queue into a new ErrState.
Returns None if OpenSSL cannot allocate the state object.
Sourcepub fn restore_and_drain(self) -> ErrorStack
pub fn restore_and_drain(self) -> ErrorStack
Restore this state onto the current thread’s error queue, then drain it.
Consumes self.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrState
impl RefUnwindSafe for ErrState
impl !Sync for ErrState
impl Unpin for ErrState
impl UnsafeUnpin for ErrState
impl UnwindSafe for ErrState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more