pub enum PeerIdentity {
Key(Fingerprint),
Local(LocalPrincipal),
Windows(WindowsPrincipal),
}Expand description
Who the peer is, once it has been proved.
Two kinds of proof, never a claim
(decisions/0008 §4.1 as
amended by 0010 §4.4): a
key the peer demonstrated it holds in the TLS handshake, or a principal the
kernel attributed to the process on the other end of a local connection.
An anonymous TLS client and an in-process peer have neither, and are
reported as None rather than as an empty identity.
Variants§
Key(Fingerprint)
The peer’s public-key fingerprint, proved by the TLS handshake.
Local(LocalPrincipal)
The peer’s local principal, proved by the kernel.
Windows(WindowsPrincipal)
The peer’s Windows account, proved by the kernel through the pipe’s client token.
Implementations§
Source§impl PeerIdentity
impl PeerIdentity
Sourcepub fn key(&self) -> Option<Fingerprint>
pub fn key(&self) -> Option<Fingerprint>
The proved key, if this identity is one.
Sourcepub fn local(&self) -> Option<LocalPrincipal>
pub fn local(&self) -> Option<LocalPrincipal>
The proved local principal, if this identity is one.
Sourcepub fn windows(&self) -> Option<&WindowsPrincipal>
pub fn windows(&self) -> Option<&WindowsPrincipal>
The proved Windows account, if this identity is one.
Trait Implementations§
Source§impl Clone for PeerIdentity
impl Clone for PeerIdentity
Source§impl Debug for PeerIdentity
impl Debug for PeerIdentity
Source§impl Display for PeerIdentity
impl Display for PeerIdentity
impl Eq for PeerIdentity
Source§impl From<Fingerprint> for PeerIdentity
impl From<Fingerprint> for PeerIdentity
Source§fn from(fp: Fingerprint) -> PeerIdentity
fn from(fp: Fingerprint) -> PeerIdentity
Converts to this type from the input type.
Source§impl Hash for PeerIdentity
impl Hash 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