pub enum SflowSample {
Flow(FlowSample),
Counter(CounterSample),
ExpandedFlow(ExpandedFlowSample),
ExpandedCounter(ExpandedCounterSample),
Unknown {
enterprise: u32,
format: u32,
data: Vec<u8>,
},
}Expand description
An sFlow sample carried within a datagram.
Each datagram can contain a mix of flow samples (packet-level data) and counter samples (interface statistics). Expanded variants use separate fields for source ID type and index instead of a packed u32.
Variants§
Flow(FlowSample)
Standard flow sample (enterprise=0, format=1).
Counter(CounterSample)
Standard counter sample (enterprise=0, format=2).
ExpandedFlow(ExpandedFlowSample)
Expanded flow sample with unpacked source ID (enterprise=0, format=3).
ExpandedCounter(ExpandedCounterSample)
Expanded counter sample with unpacked source ID (enterprise=0, format=4).
Unknown
Unrecognized sample type, preserved as raw bytes.
Trait Implementations§
Source§impl Clone for SflowSample
impl Clone for SflowSample
Source§fn clone(&self) -> SflowSample
fn clone(&self) -> SflowSample
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 SflowSample
impl Debug for SflowSample
Source§impl<'de> Deserialize<'de> for SflowSample
impl<'de> Deserialize<'de> for SflowSample
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 SflowSample
impl PartialEq for SflowSample
Source§impl Serialize for SflowSample
impl Serialize for SflowSample
impl Eq for SflowSample
impl StructuralPartialEq for SflowSample
Auto Trait Implementations§
impl Freeze for SflowSample
impl RefUnwindSafe for SflowSample
impl Send for SflowSample
impl Sync for SflowSample
impl Unpin for SflowSample
impl UnsafeUnpin for SflowSample
impl UnwindSafe for SflowSample
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