Skip to main content

HttpContextBuilderView

Struct HttpContextBuilderView 

Source
pub struct HttpContextBuilderView<'a> { /* private fields */ }
Expand description

Mutable view over one HTTP field context.

Implementations§

Source§

impl HttpContextBuilderView<'_>

Source

pub fn replace_rules(&mut self, rules: RedactionRules) -> &mut Self

Replaces all rules for this HTTP field context.

Source

pub fn raise( &mut self, field: &str, level: Sensitivity, ) -> Result<&mut Self, PolicyError>

Raises a context field’s minimum sensitivity.

Source

pub fn override_level( &mut self, field: &str, level: Sensitivity, ) -> Result<&mut Self, PolicyError>

Replaces a context field rule without weakening the base policy.

Source

pub fn allow_exact(&mut self, field: &str) -> Result<&mut Self, PolicyError>

Adds a context exact allow rule; the base policy still applies.

Source

pub fn allow_suffix(&mut self, field: &str) -> Result<&mut Self, PolicyError>

Adds a context suffix allow rule; the base policy still applies.

Source

pub fn remove_allow_exact( &mut self, field: &str, ) -> Result<&mut Self, PolicyError>

Removes a context exact allow rule.

Source

pub fn remove_allow_suffix( &mut self, field: &str, ) -> Result<&mut Self, PolicyError>

Removes a context suffix allow rule.

Source

pub fn clear_allow_rules(&mut self) -> &mut Self

Removes all context allow rules.

Source

pub fn floor(&mut self, floor: RedactionFloor) -> &mut Self

Adds a context floor. Base protection remains independently effective.

Source

pub fn disable_floor(&mut self) -> &mut Self

Disables this context’s explicit floor.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.