pub struct Ech<Octs: ?Sized>(/* private fields */);
Expand description
The Encrypted Client Hello (ECH) service parameter value.
This value holds the information necessary to connect to the service with Encrypted Client Hello. It contains all this information in wire-format to be used with the TLS ECH extension currently in development as Internet draft draft-ietf-tls-esni.
Implementations§
source§impl<Octs> Ech<Octs>
impl<Octs> Ech<Octs>
sourcepub unsafe fn from_octets_unchecked(octets: Octs) -> Self
pub unsafe fn from_octets_unchecked(octets: Octs) -> Self
Creates a new value from octets without checking.
§Safety
The caller has to ensure that octets
contains a properly
formated value of at most 65,535 octets.
source§impl Ech<[u8]>
impl Ech<[u8]>
sourcepub unsafe fn from_slice_unchecked(slice: &[u8]) -> &Self
pub unsafe fn from_slice_unchecked(slice: &[u8]) -> &Self
Creates a new value for a slice without checking.
§Safety
The caller has to ensure that slice
contains a properly
formated value of at most 65,535 octets.
source§impl<Octs: AsRef<[u8]>> Ech<Octs>
impl<Octs: AsRef<[u8]>> Ech<Octs>
sourcepub fn from_octets(octets: Octs) -> Result<Self, LongSvcParam>
pub fn from_octets(octets: Octs) -> Result<Self, LongSvcParam>
Creates a new ECH value from the given content.
Returns an error if the content is too long to fit into an SVCB parameter value.
source§impl Ech<[u8]>
impl Ech<[u8]>
sourcepub fn from_slice(slice: &[u8]) -> Result<&Self, LongSvcParam>
pub fn from_slice(slice: &[u8]) -> Result<&Self, LongSvcParam>
Creates a new ECH value from a slice of the content.
Returns an error if the slice is too long to fit into an SVCB parameter value.
Trait Implementations§
source§impl<Octs: AsRef<[u8]> + ?Sized> ComposeSvcParamValue for Ech<Octs>
impl<Octs: AsRef<[u8]> + ?Sized> ComposeSvcParamValue for Ech<Octs>
source§fn compose_len(&self) -> u16
fn compose_len(&self) -> u16
source§fn compose_value<Target: OctetsBuilder + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_value<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
target
.