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
.source§impl<O, OO> OctetsFrom<Ech<O>> for Ech<OO>where
OO: OctetsFrom<O>,
impl<O, OO> OctetsFrom<Ech<O>> for Ech<OO>where
OO: OctetsFrom<O>,
source§impl<'a, Octs> ParseSvcParamValue<'a, Octs> for Ech<Octs::Range<'a>>
impl<'a, Octs> ParseSvcParamValue<'a, Octs> for Ech<Octs::Range<'a>>
source§fn parse_value(
key: SvcParamKey,
parser: &mut Parser<'a, Octs>,
) -> Result<Option<Self>, ParseError>
fn parse_value( key: SvcParamKey, parser: &mut Parser<'a, Octs>, ) -> Result<Option<Self>, ParseError>
source§impl<Octs: ?Sized> SvcParamValue for Ech<Octs>
impl<Octs: ?Sized> SvcParamValue for Ech<Octs>
source§fn key(&self) -> SvcParamKey
fn key(&self) -> SvcParamKey
impl<Octs: AsRef<[u8]>> Eq for Ech<Octs>
Auto Trait Implementations§
impl<Octs> Freeze for Ech<Octs>
impl<Octs> RefUnwindSafe for Ech<Octs>where
Octs: RefUnwindSafe + ?Sized,
impl<Octs> Send for Ech<Octs>
impl<Octs> Sync for Ech<Octs>
impl<Octs> Unpin for Ech<Octs>
impl<Octs> UnwindSafe for Ech<Octs>where
Octs: UnwindSafe + ?Sized,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)