pub enum AggregateHashPolicy {
Auto,
None,
Header,
Footer,
Both,
}Expand description
Where to place the aggregate hash frame inside a message.
The frame holds every per-object xxh3 digest as hex-encoded text; it is a redundant copy of the per-frame inline hash slots that makes integrity checks possible without walking the body. The per-frame inline slots are always authoritative — the aggregate frame is a convenience for legacy tooling.
§Mode constraints
- Buffered encode (
encode) accepts every variant. - Streaming encode (
crate::streaming::StreamingEncoder) acceptsAuto,None,Footer.HeaderandBothare rejected at construction time with a clear error: header frames are written before any data object, so the hashes are not yet known.
Auto is the right choice for almost every caller — the encoder
picks the mode-appropriate placement.
Variants§
Auto
Encoder picks: buffered → Header, streaming → Footer.
This is the default and is valid in every mode.
None
No aggregate hash frame is emitted. Per-frame inline hash slots are unaffected.
Header
Emit a HeaderHash frame. Buffered mode only; rejected
at construction in streaming mode.
Emit a FooterHash frame. Valid in both modes.
Both
Emit BOTH a HeaderHash and a FooterHash frame, carrying
identical hash lists. Buffered mode only; rejected at
construction in streaming mode.
Trait Implementations§
Source§impl Clone for AggregateHashPolicy
impl Clone for AggregateHashPolicy
Source§fn clone(&self) -> AggregateHashPolicy
fn clone(&self) -> AggregateHashPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AggregateHashPolicy
Source§impl Debug for AggregateHashPolicy
impl Debug for AggregateHashPolicy
Source§impl Default for AggregateHashPolicy
impl Default for AggregateHashPolicy
Source§fn default() -> AggregateHashPolicy
fn default() -> AggregateHashPolicy
impl Eq for AggregateHashPolicy
Source§impl PartialEq for AggregateHashPolicy
impl PartialEq for AggregateHashPolicy
Source§fn eq(&self, other: &AggregateHashPolicy) -> bool
fn eq(&self, other: &AggregateHashPolicy) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AggregateHashPolicy
Auto Trait Implementations§
impl Freeze for AggregateHashPolicy
impl RefUnwindSafe for AggregateHashPolicy
impl Send for AggregateHashPolicy
impl Sync for AggregateHashPolicy
impl Unpin for AggregateHashPolicy
impl UnsafeUnpin for AggregateHashPolicy
impl UnwindSafe for AggregateHashPolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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