pub struct PolicyViolation { /* private fields */ }Expand description
The data regarding the policy violation.
Implementations§
Source§impl PolicyViolation
impl PolicyViolation
pub fn new( policy_name: String, violation: PolicyViolationType, client_name: Option<String>, client_id: Option<String>, ) -> Self
Sourcepub fn get_policy_name(&self) -> &str
pub fn get_policy_name(&self) -> &str
Get the name of the policy that emitted the violation.
Sourcepub fn get_policy_violation(&self) -> PolicyViolationType
pub fn get_policy_violation(&self) -> PolicyViolationType
Get the type of error.
Sourcepub fn get_client_name(&self) -> Option<&str>
pub fn get_client_name(&self) -> Option<&str>
The client name that triggered the violation.
Sourcepub fn get_client_id(&self) -> Option<&str>
pub fn get_client_id(&self) -> Option<&str>
The client ID that triggered the violation.
Trait Implementations§
Source§impl Clone for PolicyViolation
impl Clone for PolicyViolation
Source§fn clone(&self) -> PolicyViolation
fn clone(&self) -> PolicyViolation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PolicyViolation
impl RefUnwindSafe for PolicyViolation
impl Send for PolicyViolation
impl Sync for PolicyViolation
impl Unpin for PolicyViolation
impl UnwindSafe for PolicyViolation
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