Trait http_sig::ServerRequestLike
source · pub trait ServerRequestLike: RequestLike {
type Remnant;
// Required methods
fn complete_with_digest(
self,
digest: &dyn HttpDigest
) -> (Option<String>, Self::Remnant);
fn complete(self) -> Self::Remnant;
}
Expand description
This trait is to be implemented for types representing an incoming HTTP request. The HTTP verification extension methods are available on any type implementing this trait.
Typically this trait is implemented for references or mutable references to those request types rather than for the request type itself.
Required Associated Types§
Required Methods§
sourcefn complete_with_digest(
self,
digest: &dyn HttpDigest
) -> (Option<String>, Self::Remnant)
fn complete_with_digest( self, digest: &dyn HttpDigest ) -> (Option<String>, Self::Remnant)
Complete the verification process, indicating that we want to compute a digest of the request body. This may require buffering the whole request body into memory.
If a request body was present, its digest should be returned as the first element of
the tuple. Otherwise None
should be returned. The second tuple element may contain
any information the implementation wants returned to the caller (for example the buffered
request body, if it had to be removed from the request).