Skip to main content

RequestContentDigest

Trait RequestContentDigest 

Source
pub trait RequestContentDigest {
    type Error;
    type PassthroughRequest;

    // Required methods
    fn set_content_digest(
        self,
        cd_type: &ContentDigestType,
    ) -> impl Future<Output = Result<Self::PassthroughRequest, Self::Error>> + Send
       where Self: Sized;
    fn verify_content_digest(
        self,
    ) -> impl Future<Output = Result<Self::PassthroughRequest, Self::Error>> + Send
       where Self: Sized;
}
Expand description

A trait to set the http content digest in request in base64

Required Associated Types§

Required Methods§

Source

fn set_content_digest( self, cd_type: &ContentDigestType, ) -> impl Future<Output = Result<Self::PassthroughRequest, Self::Error>> + Send
where Self: Sized,

Set the content digest in the request

Source

fn verify_content_digest( self, ) -> impl Future<Output = Result<Self::PassthroughRequest, Self::Error>> + Send
where Self: Sized,

Verify the content digest in the request and returns self if it’s valid otherwise returns error

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<B> RequestContentDigest for Request<B>
where B: Body + Send, <B as Body>::Data: Send,

Source§

async fn set_content_digest( self, cd_type: &ContentDigestType, ) -> HyperDigestResult<Self::PassthroughRequest>
where Self: Sized,

Set the content digest in the request

Source§

async fn verify_content_digest( self, ) -> Result<Self::PassthroughRequest, Self::Error>
where Self: Sized,

Verifies the consistency between self and given content-digest in &u8 Returns self in Bytes if it’s valid otherwise returns error

Source§

type Error = HyperDigestError

Source§

type PassthroughRequest = Request<BoxBody<Bytes, <Request<B> as RequestContentDigest>::Error>>

Implementors§