pub struct AlertDescription(pub u8);Expand description
The AlertDescription TLS protocol enum. Values in this enum are taken
from the various RFCs covering TLS, and are listed by IANA.
Protocol enumerations in rustls are represented with a struct, which contains the numeric value used on the wire (in this case, u8). Each known value has a named const item on this type – this can be used in a match arm or to access the numeric value.
If a known value does not exist for a value you need, you can simply create it locally:
pub const MyValue: AlertDescription = AlertDescription(123);The Debug impl for this type also looks up and pretty-prints
known named items. Unknown values are formatted in hexadecimal.
Tuple Fields§
§0: u8Implementations§
Source§impl AlertDescription
impl AlertDescription
pub const CloseNotify: Self
pub const UnexpectedMessage: Self
pub const BadRecordMac: Self
pub const DecryptionFailed: Self
pub const RecordOverflow: Self
pub const DecompressionFailure: Self
pub const HandshakeFailure: Self
pub const NoCertificate: Self
pub const BadCertificate: Self
pub const UnsupportedCertificate: Self
pub const CertificateRevoked: Self
pub const CertificateExpired: Self
pub const CertificateUnknown: Self
pub const IllegalParameter: Self
pub const UnknownCa: Self
pub const AccessDenied: Self
pub const DecodeError: Self
pub const DecryptError: Self
pub const ExportRestriction: Self
pub const ProtocolVersion: Self
pub const InsufficientSecurity: Self
pub const InternalError: Self
pub const InappropriateFallback: Self
pub const UserCanceled: Self
pub const NoRenegotiation: Self
pub const MissingExtension: Self
pub const UnsupportedExtension: Self
pub const CertificateUnobtainable: Self
pub const UnrecognizedName: Self
pub const BadCertificateStatusResponse: Self
pub const BadCertificateHashValue: Self
pub const UnknownPskIdentity: Self
pub const CertificateRequired: Self
pub const NoApplicationProtocol: Self
pub const EncryptedClientHelloRequired: Self
Trait Implementations§
Source§impl Clone for AlertDescription
impl Clone for AlertDescription
Source§fn clone(&self) -> AlertDescription
fn clone(&self) -> AlertDescription
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AlertDescription
impl Debug for AlertDescription
Source§impl Display for AlertDescription
impl Display for AlertDescription
Source§impl From<&CertificateError> for AlertDescription
impl From<&CertificateError> for AlertDescription
Source§fn from(e: &CertificateError) -> Self
fn from(e: &CertificateError) -> Self
Converts to this type from the input type.
Source§impl From<AlertDescription> for u8
impl From<AlertDescription> for u8
Source§fn from(x: AlertDescription) -> Self
fn from(x: AlertDescription) -> Self
Converts to this type from the input type.
Source§impl From<InvalidMessage> for AlertDescription
impl From<InvalidMessage> for AlertDescription
Source§fn from(e: InvalidMessage) -> Self
fn from(e: InvalidMessage) -> Self
Converts to this type from the input type.
Source§impl From<PeerIncompatible> for AlertDescription
impl From<PeerIncompatible> for AlertDescription
Source§fn from(e: PeerIncompatible) -> Self
fn from(e: PeerIncompatible) -> Self
Converts to this type from the input type.
Source§impl From<PeerMisbehaved> for AlertDescription
impl From<PeerMisbehaved> for AlertDescription
Source§fn from(e: PeerMisbehaved) -> Self
fn from(e: PeerMisbehaved) -> Self
Converts to this type from the input type.
Source§impl From<u8> for AlertDescription
impl From<u8> for AlertDescription
Source§impl Hash for AlertDescription
impl Hash for AlertDescription
Source§impl PartialEq for AlertDescription
impl PartialEq for AlertDescription
Source§impl TryFrom<&Error> for AlertDescription
Determine which alert should be sent for a given error.
impl TryFrom<&Error> for AlertDescription
Determine which alert should be sent for a given error.
If this mapping fails, no alert is sent.
impl Copy for AlertDescription
impl Eq for AlertDescription
impl StructuralPartialEq for AlertDescription
Auto Trait Implementations§
impl Freeze for AlertDescription
impl RefUnwindSafe for AlertDescription
impl Send for AlertDescription
impl Sync for AlertDescription
impl Unpin for AlertDescription
impl UnsafeUnpin for AlertDescription
impl UnwindSafe for AlertDescription
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