pub struct HttpPolicyBuilderView<'a> { /* private fields */ }Expand description
Mutable view over all HTTP context differences.
§Examples
use qubit_redact::RedactionPolicy;
use qubit_redact::formats::http::UrlPathPolicy;
let policy = RedactionPolicy::builder().http(|http| {
http.url_path(UrlPathPolicy::Redact);
})?.build()?;
assert!(!policy.is_disabled());Implementations§
Source§impl HttpPolicyBuilderView<'_>
impl HttpPolicyBuilderView<'_>
Sourcepub fn header(&mut self) -> HttpContextBuilderView<'_>
pub fn header(&mut self) -> HttpContextBuilderView<'_>
Returns the header context view.
Sourcepub fn query(&mut self) -> HttpContextBuilderView<'_>
pub fn query(&mut self) -> HttpContextBuilderView<'_>
Returns the query/form context view.
Sourcepub fn body(&mut self) -> HttpContextBuilderView<'_>
pub fn body(&mut self) -> HttpContextBuilderView<'_>
Returns the structured-body context view.
Sourcepub fn url_path(&mut self, policy: UrlPathPolicy) -> &mut Self
pub fn url_path(&mut self, policy: UrlPathPolicy) -> &mut Self
Sets URL path visibility for HTTP diagnostics.
Sourcepub fn text_body(&mut self, policy: TextBodyPolicy) -> &mut Self
pub fn text_body(&mut self, policy: TextBodyPolicy) -> &mut Self
Sets opaque text-body visibility for HTTP diagnostics.
Sourcepub fn floor_all(&mut self, floor: RedactionFloor) -> &mut Self
pub fn floor_all(&mut self, floor: RedactionFloor) -> &mut Self
Sets the same floor for every HTTP field context.
Sourcepub fn disable_all_floors(&mut self) -> &mut Self
pub fn disable_all_floors(&mut self) -> &mut Self
Disables every HTTP field-context floor explicitly.
Sourcepub fn unkeyed_json(&mut self, policy: UnkeyedJsonValuePolicy) -> &mut Self
pub fn unkeyed_json(&mut self, policy: UnkeyedJsonValuePolicy) -> &mut Self
Sets the handling of root and array JSON scalar values in HTTP bodies.
Auto Trait Implementations§
impl<'a> !UnwindSafe for HttpPolicyBuilderView<'a>
impl<'a> Freeze for HttpPolicyBuilderView<'a>
impl<'a> RefUnwindSafe for HttpPolicyBuilderView<'a>
impl<'a> Send for HttpPolicyBuilderView<'a>
impl<'a> Sync for HttpPolicyBuilderView<'a>
impl<'a> Unpin for HttpPolicyBuilderView<'a>
impl<'a> UnsafeUnpin for HttpPolicyBuilderView<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more