pub struct HpkeKem(pub u16);Expand description
The Key Encapsulation Mechanism (Kem) type for HPKE operations.
Listed by IANA, as specified in RFC 9180 Section 7.1
Protocol enumerations in rustls are represented with a struct, which contains the numeric value used on the wire (in this case, u16). 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: HpkeKem = HpkeKem(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: u16Implementations§
Source§impl HpkeKem
impl HpkeKem
pub const DHKEM_P256_HKDF_SHA256: Self
pub const DHKEM_P384_HKDF_SHA384: Self
pub const DHKEM_P521_HKDF_SHA512: Self
pub const DHKEM_X25519_HKDF_SHA256: Self
pub const DHKEM_X448_HKDF_SHA512: Self
Trait Implementations§
impl Copy for HpkeKem
impl Eq for HpkeKem
impl StructuralPartialEq for HpkeKem
Auto Trait Implementations§
impl Freeze for HpkeKem
impl RefUnwindSafe for HpkeKem
impl Send for HpkeKem
impl Sync for HpkeKem
impl Unpin for HpkeKem
impl UnsafeUnpin for HpkeKem
impl UnwindSafe for HpkeKem
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