pub struct ResourceAssembly { /* private fields */ }Expand description
A consuming handoff. Authentication has already succeeded when encryption is used. No protocol actions are published until the receiver accepts the returned result.
Implementations§
Source§impl ResourceAssembly
impl ResourceAssembly
pub fn id(&self) -> &AssemblyId
Sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
Whether the data is compressed and must be decompressed to assemble.
Sourcepub fn take_compressed_data(&mut self) -> Vec<u8> ⓘ
pub fn take_compressed_data(&mut self) -> Vec<u8> ⓘ
Take the authenticated data still to be decompressed, for a caller
that decompresses it in pieces and then calls
Self::finish_decompressed or Self::decompression_failed.
Sourcepub fn finish_decompressed(
self,
decompressed: Vec<u8>,
data_state: Option<Sha256>,
) -> AssemblyResult
pub fn finish_decompressed( self, decompressed: Vec<u8>, data_state: Option<Sha256>, ) -> AssemblyResult
Self::run for data the caller decompressed itself, within
Self::max_output_size; data_state, when given, is SHA-256 over
decompressed.
Sourcepub fn decompression_failed(self, too_large: bool) -> AssemblyResult
pub fn decompression_failed(self, too_large: bool) -> AssemblyResult
The result of an assembly whose decompression failed: too_large
when the output exceeded Self::max_output_size.
Sourcepub fn input_capacity(&self) -> usize
pub fn input_capacity(&self) -> usize
Owned plaintext capacity retained while the attempt is queued.
Sourcepub fn max_output_size(&self) -> usize
pub fn max_output_size(&self) -> usize
Decoder output bound, independent of the advertised data size.