pub struct NftCounterRow {
pub family: String,
pub table: String,
pub chain: String,
pub handle: u64,
pub packet_count: u64,
pub byte_count: u64,
pub rule_repr: String,
}Expand description
One counter row distilled from nft list ruleset --json output.
rule_repr is a synthesized text shape (e.g. "ip daddr 10.0.0.1 tcp dport 443 accept")
rebuilt from the JSON expression tree so the classifier can run pure
string matching against the same shape generate_nft_ruleset emits in
supervisor.rs. We do NOT try to round-trip the original text — the
repr is a normalized debug form purely for classification + audit
surfaces.
Fields§
§family: Stringnft family, e.g. "inet", "ip", "ip6".
table: StringTable name, e.g. "cellos_<safe_id>".
chain: StringChain name, e.g. "output".
handle: u64nft handle for the rule (stable within a single ruleset version).
packet_count: u64Packet counter from the rule’s counter expression, or 0 when
no counter was present. Phase 1 emits per-rule events whether the
counter is present or zero — operators want to know “this deny rule
applied, no traffic hit it” as much as “this deny rule fired N times”.
byte_count: u64Byte counter from the rule’s counter expression, or 0.
rule_repr: StringSynthesized text shape for the classifier (see struct doc).
Trait Implementations§
Source§impl Clone for NftCounterRow
impl Clone for NftCounterRow
Source§fn clone(&self) -> NftCounterRow
fn clone(&self) -> NftCounterRow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NftCounterRow
impl Debug for NftCounterRow
Source§impl<'de> Deserialize<'de> for NftCounterRow
impl<'de> Deserialize<'de> for NftCounterRow
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>,
Source§impl PartialEq for NftCounterRow
impl PartialEq for NftCounterRow
Source§fn eq(&self, other: &NftCounterRow) -> bool
fn eq(&self, other: &NftCounterRow) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for NftCounterRow
impl Serialize for NftCounterRow
impl Eq for NftCounterRow
impl StructuralPartialEq for NftCounterRow
Auto Trait Implementations§
impl Freeze for NftCounterRow
impl RefUnwindSafe for NftCounterRow
impl Send for NftCounterRow
impl Sync for NftCounterRow
impl Unpin for NftCounterRow
impl UnsafeUnpin for NftCounterRow
impl UnwindSafe for NftCounterRow
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more