pub struct HttpContextBuilderView<'a> { /* private fields */ }Expand description
Mutable view over one HTTP field context.
Implementations§
Source§impl HttpContextBuilderView<'_>
impl HttpContextBuilderView<'_>
Sourcepub fn replace_rules(&mut self, rules: RedactionRules) -> &mut Self
pub fn replace_rules(&mut self, rules: RedactionRules) -> &mut Self
Replaces all rules for this HTTP field context.
Sourcepub fn raise(
&mut self,
field: &str,
level: Sensitivity,
) -> Result<&mut Self, PolicyError>
pub fn raise( &mut self, field: &str, level: Sensitivity, ) -> Result<&mut Self, PolicyError>
Raises a context field’s minimum sensitivity.
Sourcepub fn override_level(
&mut self,
field: &str,
level: Sensitivity,
) -> Result<&mut Self, PolicyError>
pub fn override_level( &mut self, field: &str, level: Sensitivity, ) -> Result<&mut Self, PolicyError>
Replaces a context field rule without weakening the base policy.
Sourcepub fn allow_exact(&mut self, field: &str) -> Result<&mut Self, PolicyError>
pub fn allow_exact(&mut self, field: &str) -> Result<&mut Self, PolicyError>
Adds a context exact allow rule; the base policy still applies.
Sourcepub fn allow_suffix(&mut self, field: &str) -> Result<&mut Self, PolicyError>
pub fn allow_suffix(&mut self, field: &str) -> Result<&mut Self, PolicyError>
Adds a context suffix allow rule; the base policy still applies.
Sourcepub fn remove_allow_exact(
&mut self,
field: &str,
) -> Result<&mut Self, PolicyError>
pub fn remove_allow_exact( &mut self, field: &str, ) -> Result<&mut Self, PolicyError>
Removes a context exact allow rule.
Sourcepub fn remove_allow_suffix(
&mut self,
field: &str,
) -> Result<&mut Self, PolicyError>
pub fn remove_allow_suffix( &mut self, field: &str, ) -> Result<&mut Self, PolicyError>
Removes a context suffix allow rule.
Sourcepub fn clear_allow_rules(&mut self) -> &mut Self
pub fn clear_allow_rules(&mut self) -> &mut Self
Removes all context allow rules.
Sourcepub fn floor(&mut self, floor: RedactionFloor) -> &mut Self
pub fn floor(&mut self, floor: RedactionFloor) -> &mut Self
Adds a context floor. Base protection remains independently effective.
Sourcepub fn disable_floor(&mut self) -> &mut Self
pub fn disable_floor(&mut self) -> &mut Self
Disables this context’s explicit floor.
Auto Trait Implementations§
impl<'a> !UnwindSafe for HttpContextBuilderView<'a>
impl<'a> Freeze for HttpContextBuilderView<'a>
impl<'a> RefUnwindSafe for HttpContextBuilderView<'a>
impl<'a> Send for HttpContextBuilderView<'a>
impl<'a> Sync for HttpContextBuilderView<'a>
impl<'a> Unpin for HttpContextBuilderView<'a>
impl<'a> UnsafeUnpin for HttpContextBuilderView<'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