pub enum PortKey {
Port(u16),
Other,
}Expand description
Key for port-based statistics in exit traffic data.
Exit statistics are grouped by destination port. The special “other” category aggregates traffic to ports not individually tracked.
§Example
use stem_rs::descriptor::extra_info::PortKey;
let http = PortKey::Port(80);
let https = PortKey::Port(443);
let other = PortKey::Other;
assert_eq!(format!("{}", http), "80");
assert_eq!(format!("{}", other), "other");Variants§
Trait Implementations§
impl Eq for PortKey
impl StructuralPartialEq for PortKey
Auto Trait Implementations§
impl Freeze for PortKey
impl RefUnwindSafe for PortKey
impl Send for PortKey
impl Sync for PortKey
impl Unpin for PortKey
impl UnwindSafe for PortKey
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