mirror of
https://git.asonix.dog/asonix/http-signature-normalization.git
synced 2024-06-02 13:29:38 +00:00
17 lines
377 B
Rust
17 lines
377 B
Rust
use reqwest::Request;
|
|
use std::{future::Future, pin::Pin};
|
|
|
|
pub trait CreateDigest {
|
|
fn create_digest(&mut self, payload: &[u8]) -> String;
|
|
}
|
|
|
|
pub trait WithDigest: Sized {
|
|
type Future: Future<Output = Self>;
|
|
|
|
fn with_digest<T>(&mut self, creator: T) -> Self::Future;
|
|
}
|
|
|
|
impl WithDigest for Request {
|
|
type Future = Pin<Box<dyn Future<Output = Self> + Send>>;
|
|
}
|