pub struct Error(/* private fields */);Implementations§
Source§impl Error
impl Error
Sourcepub fn application(error: Box<dyn Error + Send + Sync + 'static>) -> Self
pub fn application(error: Box<dyn Error + Send + Sync + 'static>) -> Self
An error occurred while running application code.
Can be emitted from crate::callbacks::ConnectionFuture::poll() to indicate
async task failure.
Sourcepub fn name(&self) -> &'static str
pub fn name(&self) -> &'static str
Corresponds to s2n_strerror_name for ErrorSource::Library errors.
Sourcepub fn message(&self) -> &'static str
pub fn message(&self) -> &'static str
Corresponds to s2n_strerror for ErrorSource::Library errors.
Sourcepub fn debug(&self) -> Option<&'static str>
pub fn debug(&self) -> Option<&'static str>
Corresponds to s2n_strerror_debug for ErrorSource::Library errors.
Sourcepub fn kind(&self) -> ErrorType
pub fn kind(&self) -> ErrorType
Corresponds to s2n_error_get_type for ErrorSource::Library errors.
pub fn source(&self) -> ErrorSource
Sourcepub fn application_error(
&self,
) -> Option<&Box<dyn Error + Send + Sync + 'static>>
pub fn application_error( &self, ) -> Option<&Box<dyn Error + Send + Sync + 'static>>
Returns an std::error::Error if the error source was ErrorSource::Application,
otherwise returns None.
pub fn is_retryable(&self) -> bool
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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