pub enum FetchReemit {
Unchanged,
Reframed {
framing_bytes_before: usize,
framing_bytes_after: usize,
},
}Expand description
What AnyFetchObjectWriter::reemit_object had to do.
The counterpart of Reemit, and deliberately not the same type. A
subgroup object’s fix-up rewrites one leading varint and always writes the
whole object out; a fetch frame’s is a re-encode of the whole header, and
the case worth having a shape for is the one where no re-encode is owed and
nothing is written at all.
Variants§
Unchanged
The frame’s own bytes still encode it against the frame now in front of
it, so nothing was written and the caller forwards raw untouched.
This is every frame on a stream nothing was removed from, which is why it writes nothing: a relay that copied each frame through an output buffer to discover it would copy every payload it forwards.
Reframed
New framing was needed. The whole frame — the new framing followed by
every byte of raw behind the old — was written to out, and the
caller forwards that instead of raw.
Trait Implementations§
Source§impl Clone for FetchReemit
impl Clone for FetchReemit
Source§fn clone(&self) -> FetchReemit
fn clone(&self) -> FetchReemit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more