pub struct ComputedDigests {
pub content_md5: Option<[u8; 16]>,
pub crc32_be: Option<[u8; 4]>,
pub crc32c_be: Option<[u8; 4]>,
pub sha1: Option<[u8; 20]>,
pub sha256: Option<[u8; 32]>,
pub crc64nvme_be: Option<[u8; 8]>,
}Expand description
Finalised digest values for every algorithm whose hasher was
active. Populated by the tee on the EOF poll and exposed via the
DigestHandle returned by tee_into_hashers_with_handle; the
PUT handler reads it after body consumption to compare against
request trailer values (the chunked / SigV4-streaming SDK case
where the checksum is delivered post-body rather than as a header).
Fields§
§content_md5: Option<[u8; 16]>§crc32_be: Option<[u8; 4]>§crc32c_be: Option<[u8; 4]>§sha1: Option<[u8; 20]>§sha256: Option<[u8; 32]>§crc64nvme_be: Option<[u8; 8]>Implementations§
Source§impl ComputedDigests
impl ComputedDigests
Sourcepub fn compare_b64(&self, algorithm: &str, claim_b64: &str) -> S3Result<()>
pub fn compare_b64(&self, algorithm: &str, claim_b64: &str) -> S3Result<()>
Compare one finalised digest against a base64-encoded
trailer-supplied claim. Returns Err(BadDigest) on mismatch,
Err(InvalidDigest) on malformed input, Ok(()) on match.
algorithm is the wire header name used in the error message;
the match is case-insensitive because HTTP header field
names are case-insensitive per RFC 9110 §5.1 and AWS SDKs may
announce trailers as X-Amz-Checksum-Crc32c (or any other
casing) — we keep the original casing in error messages for
fidelity but normalise for the dispatch.
Trait Implementations§
Source§impl Clone for ComputedDigests
impl Clone for ComputedDigests
Source§fn clone(&self) -> ComputedDigests
fn clone(&self) -> ComputedDigests
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 ComputedDigests
impl Debug for ComputedDigests
Source§impl Default for ComputedDigests
impl Default for ComputedDigests
Source§fn default() -> ComputedDigests
fn default() -> ComputedDigests
Auto Trait Implementations§
impl Freeze for ComputedDigests
impl RefUnwindSafe for ComputedDigests
impl Send for ComputedDigests
impl Sync for ComputedDigests
impl Unpin for ComputedDigests
impl UnsafeUnpin for ComputedDigests
impl UnwindSafe for ComputedDigests
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<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