pub enum Connection {
Ipv4 {
address: [u8; 4],
port: u16,
},
Ipv6 {
address: [u8; 16],
port: u16,
scope: u32,
},
UnixPath {
path: PathBuf,
},
UnixAbstract {
name: Vec<u8>,
},
}Expand description
A connection that a command made to a service outside the trace: an IPv4 or IPv6 address and port, or a Unix socket by path or abstract name. What came back is an input that kizz cannot see, so it warns about the connection, and the result is still cached.
Connections are ordered by their kind, then by address or path, as a record keeps them: sorted and without repeats.
Variants§
Ipv4
An IPv4 address and port.
Ipv6
An IPv6 address and port, with the scope of the address, 0 for none.
Fields
UnixPath
A Unix socket by its absolute path.
UnixAbstract
A Unix socket in the abstract namespace, by its name without the zero byte that starts it.
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn text(&self, path: impl Fn(&Path) -> String) -> String
pub fn text(&self, path: impl Fn(&Path) -> String) -> String
The connection as text, with a Unix socket’s path shown by path: an
address with its port, such as 127.0.0.1:80 or [fe80::1%2]:80;
Unix socket PATH; or abstract Unix socket @NAME, with each byte of the
name that is not printable ASCII escaped, such as \x00.
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§impl Debug for Connection
impl Debug for Connection
Source§impl<'bytes, Ctx> Decode<'bytes, Ctx> for Connection
impl<'bytes, Ctx> Decode<'bytes, Ctx> for Connection
Source§impl Display for Connection
impl Display for Connection
Source§impl<Ctx> Encode<Ctx> for Connection
impl<Ctx> Encode<Ctx> for Connection
impl Eq for Connection
Source§impl Hash for Connection
impl Hash for Connection
Source§impl Ord for Connection
impl Ord for Connection
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for Connection
impl PartialEq for Connection
Source§impl PartialOrd for Connection
impl PartialOrd for Connection
impl StructuralPartialEq for Connection
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
impl UnwindSafe for Connection
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.