Struct libdata::stats::Size
[−]
pub struct Size { pub packets: Count, pub size: Bytes, }
A poorer version of Stat
This one contains only the number of packets and the size. It is used during the construction of the flow slice and the other statistics are added later on.
Because the duration and the fact it relates to a single flow is known during the conversion, the other statistics are not needed and this makes it easier to manipulate.
Fields
packets: Count
Number of packets.
size: Bytes
Number of bytes (including headers).
Methods
impl Size
fn sub_safe(&self, other: &Size) -> bool
Checks if other is equal or smaller in each subfield.
This basically checks if it is safe to do self - other
.
Trait Implementations
impl Add for Size
type Output = Size
The resulting type after applying the +
operator
fn add(self, rhs: Size) -> Size
The method for the +
operator
impl AddAssign for Size
fn add_assign(&mut self, rhs: Size)
The method for the +=
operator
impl Clone for Size
fn clone(&self) -> Size
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Size
impl Default for Size
impl Eq for Size
impl PartialEq for Size
fn eq(&self, __arg_0: &Size) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Size) -> bool
This method tests for !=
.