Struct ntap_core::net::stat::NetStatData
source · pub struct NetStatData {
pub default_interface: Interface,
pub traffic: TrafficInfo,
pub remote_hosts: HashMap<IpAddr, RemoteHostInfo>,
pub connection_map: HashMap<SocketConnection, TrafficInfo>,
pub local_socket_map: HashMap<LocalSocket, SocketProcess>,
pub local_ip_map: HashMap<IpAddr, String>,
}
Fields§
§default_interface: Interface
§traffic: TrafficInfo
§remote_hosts: HashMap<IpAddr, RemoteHostInfo>
§connection_map: HashMap<SocketConnection, TrafficInfo>
§local_socket_map: HashMap<LocalSocket, SocketProcess>
§local_ip_map: HashMap<IpAddr, String>
Implementations§
source§impl NetStatData
impl NetStatData
pub fn new() -> Self
pub fn merge(&mut self, other: NetStatData, duration: Duration)
pub fn remove_old_entries(&mut self, ttl: Duration)
pub fn get_remote_hosts(&self, limit: Option<usize>) -> Vec<HostDisplayInfo>
pub fn get_processes(&self, limit: Option<usize>) -> Vec<ProcessDisplayInfo>
pub fn get_connections(&self, limit: Option<usize>) -> Vec<SocketDisplayInfo>
pub fn get_connections_with_opt( &self, limit: Option<usize>, opt: SocketInfoOption, ) -> Vec<SocketDisplayInfo>
pub fn get_app_protocols(&self, limit: Option<usize>) -> Vec<ServiceDisplayInfo>
pub fn get_overview(&self) -> Overview
Trait Implementations§
source§impl Clone for NetStatData
impl Clone for NetStatData
source§fn clone(&self) -> NetStatData
fn clone(&self) -> NetStatData
Returns a copy 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 NetStatData
impl Debug for NetStatData
source§impl<'de> Deserialize<'de> for NetStatData
impl<'de> Deserialize<'de> for NetStatData
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
Auto Trait Implementations§
impl Freeze for NetStatData
impl RefUnwindSafe for NetStatData
impl Send for NetStatData
impl Sync for NetStatData
impl Unpin for NetStatData
impl UnwindSafe for NetStatData
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> 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>
Converts
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>
Converts
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