pub struct EnforcementViolation {
pub violation_type: ViolationType,
pub current: u64,
pub limit: u64,
pub message: String,
}Expand description
Details of an enforcement violation
Fields§
§violation_type: ViolationTypeType of violation
current: u64Current value
limit: u64Limit value
message: StringHuman-readable message
Implementations§
Source§impl EnforcementViolation
impl EnforcementViolation
Sourcepub fn new(violation_type: ViolationType, current: u64, limit: u64) -> Self
pub fn new(violation_type: ViolationType, current: u64, limit: u64) -> Self
Create a new violation
Sourcepub fn to_error(&self) -> ExecutionError
pub fn to_error(&self) -> ExecutionError
Convert to an ExecutionError
Trait Implementations§
Source§impl Clone for EnforcementViolation
impl Clone for EnforcementViolation
Source§fn clone(&self) -> EnforcementViolation
fn clone(&self) -> EnforcementViolation
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 moreSource§impl Debug for EnforcementViolation
impl Debug for EnforcementViolation
Source§impl<'de> Deserialize<'de> for EnforcementViolation
impl<'de> Deserialize<'de> for EnforcementViolation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EnforcementViolation
impl PartialEq for EnforcementViolation
Source§impl Serialize for EnforcementViolation
impl Serialize for EnforcementViolation
impl Eq for EnforcementViolation
impl StructuralPartialEq for EnforcementViolation
Auto Trait Implementations§
impl Freeze for EnforcementViolation
impl RefUnwindSafe for EnforcementViolation
impl Send for EnforcementViolation
impl Sync for EnforcementViolation
impl Unpin for EnforcementViolation
impl UnsafeUnpin for EnforcementViolation
impl UnwindSafe for EnforcementViolation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.