pub struct DrainedUsage {
pub requests: u64,
pub ingress_bytes: u64,
pub egress_bytes: u64,
pub tokens_in: u64,
pub tokens_out: u64,
pub cost_micros: u64,
pub blocked: u64,
pub waf_sqli: u64,
pub waf_xss: u64,
pub waf_path_traversal: u64,
pub waf_custom: u64,
}Expand description
A drained snapshot of the managed-mode usage accumulators (requests + bandwidth + LLM
tokens/cost). Returned by Metrics::drain_usage and re-applied by Metrics::restore_usage
if the report fails to send.
Fields§
§requests: u64§ingress_bytes: u64§egress_bytes: u64§tokens_in: u64§tokens_out: u64§cost_micros: u64§blocked: u64Requests the edge denied since the last drain (a subset of requests).
waf_sqli: u64WAF matches since the last drain, by rule class (indices parallel to [WAF_RULES] =
[sqli, xss, path_traversal, custom]). Reported to the control plane for the console’s
per-category security breakdown.
waf_xss: u64§waf_path_traversal: u64§waf_custom: u64Implementations§
Trait Implementations§
Source§impl Clone for DrainedUsage
impl Clone for DrainedUsage
Source§fn clone(&self) -> DrainedUsage
fn clone(&self) -> DrainedUsage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DrainedUsage
Source§impl Debug for DrainedUsage
impl Debug for DrainedUsage
Source§impl Default for DrainedUsage
impl Default for DrainedUsage
Source§fn default() -> DrainedUsage
fn default() -> DrainedUsage
Returns the “default value” for a type. Read more
impl Eq for DrainedUsage
Source§impl From<DrainedUsage> for UsageDelta
impl From<DrainedUsage> for UsageDelta
Source§fn from(u: DrainedUsage) -> Self
fn from(u: DrainedUsage) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DrainedUsage
impl PartialEq for DrainedUsage
impl StructuralPartialEq for DrainedUsage
Auto Trait Implementations§
impl Freeze for DrainedUsage
impl RefUnwindSafe for DrainedUsage
impl Send for DrainedUsage
impl Sync for DrainedUsage
impl Unpin for DrainedUsage
impl UnsafeUnpin for DrainedUsage
impl UnwindSafe for DrainedUsage
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.