pub struct EnforcementWarning {
pub warning_type: ViolationType,
pub usage_percent: u32,
pub message: String,
}Expand description
Warning about approaching limits
Fields§
§warning_type: ViolationTypeType of limit being approached
usage_percent: u32Current usage percentage (0-100)
message: StringHuman-readable message
Implementations§
Source§impl EnforcementWarning
impl EnforcementWarning
Sourcepub fn new(warning_type: ViolationType, current: u64, limit: u64) -> Self
pub fn new(warning_type: ViolationType, current: u64, limit: u64) -> Self
Create a new warning
Trait Implementations§
Source§impl Clone for EnforcementWarning
impl Clone for EnforcementWarning
Source§fn clone(&self) -> EnforcementWarning
fn clone(&self) -> EnforcementWarning
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 EnforcementWarning
impl Debug for EnforcementWarning
Source§impl<'de> Deserialize<'de> for EnforcementWarning
impl<'de> Deserialize<'de> for EnforcementWarning
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 EnforcementWarning
impl PartialEq for EnforcementWarning
Source§impl Serialize for EnforcementWarning
impl Serialize for EnforcementWarning
impl Eq for EnforcementWarning
impl StructuralPartialEq for EnforcementWarning
Auto Trait Implementations§
impl Freeze for EnforcementWarning
impl RefUnwindSafe for EnforcementWarning
impl Send for EnforcementWarning
impl Sync for EnforcementWarning
impl Unpin for EnforcementWarning
impl UnsafeUnpin for EnforcementWarning
impl UnwindSafe for EnforcementWarning
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.