#[non_exhaustive]pub struct ObservedPeer {
pub status: ObservedPeerStatus,
pub uid: Option<u32>,
pub sid: Option<String>,
pub exe: Option<String>,
pub signing_id: Option<String>,
}Expand description
What the daemon learned from the kernel about the process that opened the route, read once when its connection was accepted.
This is an observation, not an authorization: the route’s principal is
unchanged by it. exe is informational. signing_id is present only when
the platform validated the process’s code signature.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.status: ObservedPeerStatus§uid: Option<u32>The peer’s effective user id (macOS and Linux).
sid: Option<String>The peer’s user SID (Windows).
exe: Option<String>The peer’s executable path, omitted when it could not be read.
signing_id: Option<String>The peer’s code-signing identifier, present only for validly signed code on a platform that checks it.
Implementations§
Source§impl ObservedPeer
impl ObservedPeer
Sourcepub fn unobserved() -> Self
pub fn unobserved() -> Self
A connection with no kernel peer identity: {"status":"unobserved"}.
Sourcepub fn observed_uid(uid: u32) -> Self
pub fn observed_uid(uid: u32) -> Self
An observed peer identified by its Unix user id.
Sourcepub fn observed_sid(sid: impl Into<String>) -> Self
pub fn observed_sid(sid: impl Into<String>) -> Self
An observed peer identified by its Windows user SID.
Sourcepub fn with_signing_id(self, signing_id: Option<String>) -> Self
pub fn with_signing_id(self, signing_id: Option<String>) -> Self
Set or clear the code-signing identifier.