pub struct HashCompressor<Target> { /* private fields */ }
Expand description
A domain name compressor that uses a hash table.
This type wraps around an octets builder and implements domain name compression for it. It stores the position of any domain name it has seen in a hash table.
The position of a domain name is calculated relative to the beginning of
the underlying octets builder. This means that this builder must represent
the message only. This means that if you are using the StreamTarget
,
you need to place it inside this type, not the other way around.
Implementations§
Source§impl<Target> HashCompressor<Target>
impl<Target> HashCompressor<Target>
Trait Implementations§
Source§impl<Target: Clone> Clone for HashCompressor<Target>
impl<Target: Clone> Clone for HashCompressor<Target>
Source§fn clone(&self) -> HashCompressor<Target>
fn clone(&self) -> HashCompressor<Target>
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<Target: Composer> Composer for HashCompressor<Target>
impl<Target: Composer> Composer for HashCompressor<Target>
Source§fn append_compressed_name<N: ToName + ?Sized>(
&mut self,
name: &N,
) -> Result<(), Self::AppendError>
fn append_compressed_name<N: ToName + ?Sized>( &mut self, name: &N, ) -> Result<(), Self::AppendError>
Appends a domain name using name compression if supported. Read more
fn can_compress(&self) -> bool
Source§impl<Target: Debug> Debug for HashCompressor<Target>
impl<Target: Debug> Debug for HashCompressor<Target>
Source§impl<Target: OctetsBuilder> OctetsBuilder for HashCompressor<Target>
impl<Target: OctetsBuilder> OctetsBuilder for HashCompressor<Target>
Source§type AppendError = <Target as OctetsBuilder>::AppendError
type AppendError = <Target as OctetsBuilder>::AppendError
The error type when appending data fails. Read more
Source§fn append_slice(&mut self, slice: &[u8]) -> Result<(), Self::AppendError>
fn append_slice(&mut self, slice: &[u8]) -> Result<(), Self::AppendError>
Appends the content of a slice to the builder. Read more
Auto Trait Implementations§
impl<Target> Freeze for HashCompressor<Target>where
Target: Freeze,
impl<Target> RefUnwindSafe for HashCompressor<Target>where
Target: RefUnwindSafe,
impl<Target> Send for HashCompressor<Target>where
Target: Send,
impl<Target> Sync for HashCompressor<Target>where
Target: Sync,
impl<Target> Unpin for HashCompressor<Target>where
Target: Unpin,
impl<Target> UnwindSafe for HashCompressor<Target>where
Target: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
Source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
Source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.