pub trait ContentDigest: Body {
    // Provided methods
    fn into_bytes<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Self::Error>> + Send + 'async_trait>>
       where Self: Sized + Send + 'async_trait,
             Self::Data: Send { ... }
    fn into_bytes_with_digest<'life0, 'async_trait>(
        self,
        cd_type: &'life0 ContentDigestType
    ) -> Pin<Box<dyn Future<Output = Result<(Bytes, String), Self::Error>> + Send + 'async_trait>>
       where Self: Sized + Send + 'async_trait,
             Self::Data: Send,
             'life0: 'async_trait { ... }
    fn verify_digest<'life0, 'life1, 'async_trait>(
        self,
        cd_type: &'life0 ContentDigestType,
        _cd: &'life1 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>
       where Self: Sized + Send + 'async_trait,
             Self::Data: Send,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Provided Methods§

source

fn into_bytes<'async_trait>( self ) -> Pin<Box<dyn Future<Output = Result<Bytes, Self::Error>> + Send + 'async_trait>>
where Self: Sized + Send + 'async_trait, Self::Data: Send,

Returns the bytes object of the body

source

fn into_bytes_with_digest<'life0, 'async_trait>( self, cd_type: &'life0 ContentDigestType ) -> Pin<Box<dyn Future<Output = Result<(Bytes, String), Self::Error>> + Send + 'async_trait>>
where Self: Sized + Send + 'async_trait, Self::Data: Send, 'life0: 'async_trait,

Returns the content digest in base64

source

fn verify_digest<'life0, 'life1, 'async_trait>( self, cd_type: &'life0 ContentDigestType, _cd: &'life1 [u8] ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>
where Self: Sized + Send + 'async_trait, Self::Data: Send, 'life0: 'async_trait, 'life1: 'async_trait,

Verifies the consistency between self and given content-digest in &u8

Implementors§

source§

impl<T> ContentDigest for T
where T: Body + ?Sized,