Trait aws_smithy_checksums::http::HttpChecksum
source · pub trait HttpChecksum: Checksum + Send + Sync {
// Required method
fn header_name(&self) -> &'static str;
// Provided methods
fn headers(self: Box<Self>) -> HeaderMap<HeaderValue> { ... }
fn header_value(self: Box<Self>) -> HeaderValue { ... }
fn size(&self) -> u64 { ... }
}
Expand description
Checksum algorithms are use to validate the integrity of data. Structs that implement this trait can be used as checksum calculators. This trait requires Send + Sync because these checksums are often used in a threaded context.
Required Methods§
sourcefn header_name(&self) -> &'static str
fn header_name(&self) -> &'static str
Return the HeaderName
used to represent this checksum algorithm
Provided Methods§
sourcefn headers(self: Box<Self>) -> HeaderMap<HeaderValue>
fn headers(self: Box<Self>) -> HeaderMap<HeaderValue>
Either return this checksum as a HeaderMap
containing one HTTP header, or return an error
describing why checksum calculation failed.
sourcefn header_value(self: Box<Self>) -> HeaderValue
fn header_value(self: Box<Self>) -> HeaderValue
Return the calculated checksum as a base64-encoded HeaderValue