Struct domain::base::message_builder::StaticCompressor
source · [−]pub struct StaticCompressor<Target> { /* private fields */ }
Expand description
A domain name compressor that doesn’t require an allocator.
This type wraps around an octets builder and implements domain name compression. It does not require an allocator but because of that it can only remember the position of up to 24 domain names. This should be sufficient for most messages.
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
sourceimpl<Target> StaticCompressor<Target>
impl<Target> StaticCompressor<Target>
Trait Implementations
sourceimpl<Target: Clone> Clone for StaticCompressor<Target>
impl<Target: Clone> Clone for StaticCompressor<Target>
sourcefn clone(&self) -> StaticCompressor<Target>
fn clone(&self) -> StaticCompressor<Target>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<Target: Debug> Debug for StaticCompressor<Target>
impl<Target: Debug> Debug for StaticCompressor<Target>
sourceimpl<Target> OctetsBuilder for StaticCompressor<Target>where
Target: OctetsBuilder + AsRef<[u8]> + AsMut<[u8]>,
impl<Target> OctetsBuilder for StaticCompressor<Target>where
Target: OctetsBuilder + AsRef<[u8]> + AsMut<[u8]>,
type Octets = <Target as OctetsBuilder>::Octets
type Octets = <Target as OctetsBuilder>::Octets
The type of the octets the builder can be converted into. Read more
sourcefn append_slice(&mut self, slice: &[u8]) -> Result<(), ShortBuf>
fn append_slice(&mut self, slice: &[u8]) -> Result<(), ShortBuf>
Appends the content of a slice to the builder. Read more
sourcefn append_compressed_dname<N: ToDname>(
&mut self,
name: &N
) -> Result<(), ShortBuf>
fn append_compressed_dname<N: ToDname>(
&mut self,
name: &N
) -> Result<(), ShortBuf>
Appends a domain name using name compression if supported. Read more
Auto Trait Implementations
impl<Target> RefUnwindSafe for StaticCompressor<Target>where
Target: RefUnwindSafe,
impl<Target> Send for StaticCompressor<Target>where
Target: Send,
impl<Target> Sync for StaticCompressor<Target>where
Target: Sync,
impl<Target> Unpin for StaticCompressor<Target>where
Target: Unpin,
impl<Target> UnwindSafe for StaticCompressor<Target>where
Target: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
sourcefn octets_into(self) -> Result<Target, ShortBuf>
fn octets_into(self) -> Result<Target, ShortBuf>
Performs the conversion.