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§

source

fn header_name(&self) -> &'static str

Return the HeaderName used to represent this checksum algorithm

Provided Methods§

source

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.

source

fn header_value(self: Box<Self>) -> HeaderValue

Return the calculated checksum as a base64-encoded HeaderValue

source

fn size(&self) -> u64

Return the total size of

  • The HeaderName
  • The header name/value separator
  • The base64-encoded HeaderValue

Implementors§