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

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 ) -> Result<Self::PassthroughRequest, Self::Error>
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

§

type Error = Error

§

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

Implementors§