pub struct CompressedData { /* private fields */ }Expand description
Holds a compressed data packet.
A compressed data packet is a container. See Section 5.6 of RFC 9580 for details.
When the parser encounters a compressed data packet with an
unknown compress algorithm, it returns an Unknown packet instead
of a CompressedData packet.
Implementations§
Source§impl CompressedData
impl CompressedData
Sourcepub fn new(algo: CompressionAlgorithm) -> CompressedData
pub fn new(algo: CompressionAlgorithm) -> CompressedData
Returns a new CompressedData packet.
Sourcepub fn algo(&self) -> CompressionAlgorithm
pub fn algo(&self) -> CompressionAlgorithm
Gets the compression algorithm.
Sourcepub fn set_algo(&mut self, algo: CompressionAlgorithm) -> CompressionAlgorithm
pub fn set_algo(&mut self, algo: CompressionAlgorithm) -> CompressionAlgorithm
Sets the compression algorithm.
Source§impl CompressedData
This packet implements the processed container
interface.
impl CompressedData
This packet implements the processed container interface.
Container packets like this one can contain either unprocessed or processed, structured data.
Sourcepub fn container_ref(&self) -> &Container
pub fn container_ref(&self) -> &Container
Returns a reference to the container.
Sourcepub fn container_mut(&mut self) -> &mut Container
pub fn container_mut(&mut self) -> &mut Container
Returns a mutable reference to the container.
Trait Implementations§
Source§impl Any<CompressedData> for Packet
impl Any<CompressedData> for Packet
Source§fn downcast(self) -> Result<CompressedData, Packet>
fn downcast(self) -> Result<CompressedData, Packet>
T, returning the packet if it fails. Read moreSource§fn downcast_ref(&self) -> Option<&CompressedData>
fn downcast_ref(&self) -> Option<&CompressedData>
Source§fn downcast_mut(&mut self) -> Option<&mut CompressedData>
fn downcast_mut(&mut self) -> Option<&mut CompressedData>
Source§impl Clone for CompressedData
impl Clone for CompressedData
Source§fn clone(&self) -> CompressedData
fn clone(&self) -> CompressedData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompressedData
impl Debug for CompressedData
impl Eq for CompressedData
Source§impl From<CompressedData> for Packet
impl From<CompressedData> for Packet
Source§fn from(s: CompressedData) -> Packet
fn from(s: CompressedData) -> Packet
Source§impl Hash for CompressedData
impl Hash for CompressedData
Source§impl IntoIterator for CompressedData
Implement IntoIterator so that
cert::insert_packets(sig) just works.
impl IntoIterator for CompressedData
Implement IntoIterator so that
cert::insert_packets(sig) just works.
Source§type Item = CompressedData
type Item = CompressedData
Source§type IntoIter = Once<CompressedData>
type IntoIter = Once<CompressedData>
Source§fn into_iter(self) -> <CompressedData as IntoIterator>::IntoIter
fn into_iter(self) -> <CompressedData as IntoIterator>::IntoIter
Source§impl Marshal for CompressedData
impl Marshal for CompressedData
Source§impl MarshalInto for CompressedData
impl MarshalInto for CompressedData
Source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Computes the maximal length of the serialized representation.
The size of the serialized compressed data packet is tricky to predict. First, it depends on the data being compressed. Second, we emit partial body encoded data.
This function tries overestimates the length. However, it may
happen that serialize_into() fails.
§Errors
If serialization would fail, this function returns 0.
Source§fn serialize_into(&self, buf: &mut [u8]) -> Result<usize, Error>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize, Error>
Source§impl<'a> Parse<'a, CompressedData> for CompressedData
impl<'a> Parse<'a, CompressedData> for CompressedData
Source§fn from_buffered_reader<R>(reader: R) -> Result<CompressedData, Error>where
R: BufferedReader<Cookie> + 'a,
fn from_buffered_reader<R>(reader: R) -> Result<CompressedData, Error>where
R: BufferedReader<Cookie> + 'a,
Source§impl PartialEq for CompressedData
impl PartialEq for CompressedData
impl StructuralPartialEq for CompressedData
Auto Trait Implementations§
impl Freeze for CompressedData
impl RefUnwindSafe for CompressedData
impl Send for CompressedData
impl Sync for CompressedData
impl Unpin for CompressedData
impl UnsafeUnpin for CompressedData
impl UnwindSafe for CompressedData
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more