pub struct PeerIdentity {
pub uid: u32,
pub pid: Option<i32>,
}Expand description
The identity of a process connected to the agent socket, read from the peer credentials of the connection.
Args (fields): uid, pid.
Usage:
ⓘ
let peer = PeerIdentity { uid: 1000, pid: Some(4242) };Fields§
§uid: u32Effective user id of the connecting process.
pid: Option<i32>Process id of the connecting process, when the platform exposes it (Linux via
SO_PEERCRED; None on macOS, whose getpeereid returns no pid).
Implementations§
Source§impl PeerIdentity
impl PeerIdentity
Sourcepub fn local() -> PeerIdentity
pub fn local() -> PeerIdentity
The agent’s own process — used for in-process / default sessions where no external peer applies.
Trait Implementations§
Source§impl Clone for PeerIdentity
impl Clone for PeerIdentity
Source§fn clone(&self) -> PeerIdentity
fn clone(&self) -> PeerIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PeerIdentity
Source§impl Debug for PeerIdentity
impl Debug for PeerIdentity
impl Eq for PeerIdentity
Source§impl PartialEq for PeerIdentity
impl PartialEq for PeerIdentity
impl StructuralPartialEq for PeerIdentity
Auto Trait Implementations§
impl Freeze for PeerIdentity
impl RefUnwindSafe for PeerIdentity
impl Send for PeerIdentity
impl Sync for PeerIdentity
impl Unpin for PeerIdentity
impl UnsafeUnpin for PeerIdentity
impl UnwindSafe for PeerIdentity
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.