pub struct HttpCertification(/* private fields */);Expand description
A certified HttpRequest and HttpResponse pair.
It supports three types of certification via associated functions:
-
skip() excludes both an HttpRequest and the corresponding HttpResponse from certification.
-
response_only() includes an HttpResponse but excludes the corresponding HttpRequest from certification.
-
full() includes both an HttpResponse and the corresponding HttpRequest in certification.
Implementations§
Source§impl HttpCertification
impl HttpCertification
Sourcepub fn skip() -> HttpCertification
pub fn skip() -> HttpCertification
Creates a certification that excludes both the HttpRequest and the corresponding HttpResponse.
Sourcepub fn response_only(
cel_expr_def: &DefaultResponseOnlyCelExpression<'_>,
response: &HttpResponse<'_>,
response_body_hash: Option<Hash>,
) -> HttpCertificationResult<HttpCertification>
pub fn response_only( cel_expr_def: &DefaultResponseOnlyCelExpression<'_>, response: &HttpResponse<'_>, response_body_hash: Option<Hash>, ) -> HttpCertificationResult<HttpCertification>
Creates a certification that includes an HttpResponse, but excludes the corresponding HttpRequest.
Sourcepub fn full(
cel_expr_def: &DefaultFullCelExpression<'_>,
request: &HttpRequest<'_>,
response: &HttpResponse<'_>,
response_body_hash: Option<Hash>,
) -> HttpCertificationResult<HttpCertification>
pub fn full( cel_expr_def: &DefaultFullCelExpression<'_>, request: &HttpRequest<'_>, response: &HttpResponse<'_>, response_body_hash: Option<Hash>, ) -> HttpCertificationResult<HttpCertification>
Creates a certification that includes both an HttpResponse and the corresponding HttpRequest.
Sourcepub fn response_only_prehashed(cel_expr_hash: Hash, response_hash: Hash) -> Self
pub fn response_only_prehashed(cel_expr_hash: Hash, response_hash: Hash) -> Self
Creates a response-only certification from pre-computed hashes.
Unlike response_only, this constructor does not
require an HttpResponse and performs no validation. Use it when the CEL expression
hash and response hash have already been computed externally (e.g. via
response_hash_from_headers).
Trait Implementations§
Source§impl Clone for HttpCertification
impl Clone for HttpCertification
Source§fn clone(&self) -> HttpCertification
fn clone(&self) -> HttpCertification
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more