feat: Add Hash impls for extension types (#84)

This commit is contained in:
0x676e67 2025-07-06 17:59:49 +08:00 committed by GitHub
parent 3010f78112
commit 8ec7576cf4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -533,7 +533,7 @@ impl SelectCertError {
/// ExtensionType that is not defined by the impl. `From` will be deprecated in favor of `TryFrom` /// ExtensionType that is not defined by the impl. `From` will be deprecated in favor of `TryFrom`
/// in the next major bump of the library. /// in the next major bump of the library.
#[repr(transparent)] #[repr(transparent)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ExtensionType(u16); pub struct ExtensionType(u16);
impl ExtensionType { impl ExtensionType {
@ -581,7 +581,7 @@ impl From<u16> for ExtensionType {
} }
/// An SSL/TLS protocol version. /// An SSL/TLS protocol version.
#[derive(Copy, Clone, PartialEq, Eq)] #[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct SslVersion(u16); pub struct SslVersion(u16);
impl SslVersion { impl SslVersion {
@ -836,7 +836,7 @@ impl CompliancePolicy {
} }
// IANA assigned identifier of compression algorithm. See https://www.rfc-editor.org/rfc/rfc8879.html#name-compression-algorithms // IANA assigned identifier of compression algorithm. See https://www.rfc-editor.org/rfc/rfc8879.html#name-compression-algorithms
#[derive(Debug, Copy, Clone, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct CertificateCompressionAlgorithm(u16); pub struct CertificateCompressionAlgorithm(u16);
impl CertificateCompressionAlgorithm { impl CertificateCompressionAlgorithm {