pub struct PolicyViolations { /* private fields */ }Expand description
Interface to access and modify the violation associated to the current request.
Implementations§
Source§impl PolicyViolations
impl PolicyViolations
pub fn new<T: PropertyAccessor + 'static>( stream_properties: T, policy_name: String, ) -> Self
Sourcepub fn policy_violation(&self) -> Option<PolicyViolation>
pub fn policy_violation(&self) -> Option<PolicyViolation>
Returns the existing policy violation associated to the current request.
Sourcepub fn generate_policy_violation(&self)
pub fn generate_policy_violation(&self)
Generates a new policy violation for the current request. If one was already generated, it is overridden
Trait Implementations§
Source§impl FromContext<ConfigureContext> for PolicyViolations
impl FromContext<ConfigureContext> for PolicyViolations
type Error = Infallible
fn from_context(context: &ConfigureContext) -> Result<Self, Self::Error>
fn from_context_always(context: &C) -> Selfwhere
Self: FromContext<C, E, Error = Infallible>,
Auto Trait Implementations§
impl Freeze for PolicyViolations
impl !RefUnwindSafe for PolicyViolations
impl !Send for PolicyViolations
impl !Sync for PolicyViolations
impl Unpin for PolicyViolations
impl !UnwindSafe for PolicyViolations
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