pub struct Error(/* private fields */);Implementations§
Source§impl Error
impl Error
Sourcepub fn application(error: Box<dyn Error + Send + Sync>) -> Error
pub fn application(error: Box<dyn Error + Send + Sync>) -> Error
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>>
pub fn application_error(&self) -> Option<&Box<dyn Error + Send + Sync>>
Returns an std::error::Error if the error source was ErrorSource::Application,
otherwise returns None.
pub fn is_retryable(&self) -> bool
Source§impl Error
impl Error
Sourcepub fn alert(&self) -> Option<u8>
pub fn alert(&self) -> Option<u8>
s2n-tls does not send specific errors.
However, we can attempt to map local errors into the alerts that we would have sent if we sent alerts.
This API is currently incomplete and should not be relied upon.
Corresponds to s2n_error_get_alert for ErrorSource::Library errors.