Type Definition actix_hash::BodySha1

source · []
pub type BodySha1<T> = BodyHash<T, Sha1>;
This is supported on crate feature sha1 only.
Expand description

Wraps an extractor and calculates a SHA-1 body checksum hash alongside.

Example

use actix_hash::BodySha1;

async fn handler(body: BodySha1<String>) -> String {
    assert_eq!(body.hash().len(), 20);
    body.into_parts().inner
}