pub struct PeerInfo {
pub pid: Option<u32>,
pub uid: Option<u32>,
pub gid: Option<u32>,
pub executable_path: Option<String>,
pub attestation_class: String,
pub subject_id: Option<String>,
pub signature_valid: bool,
pub display_label: Option<String>,
}Expand description
Identity and attestation facts about a connected peer.
Fields§
§pid: Option<u32>§uid: Option<u32>§gid: Option<u32>§executable_path: Option<String>§attestation_class: String§subject_id: Option<String>§signature_valid: bool§display_label: Option<String>Implementations§
Source§impl PeerInfo
impl PeerInfo
Sourcepub fn from_stream(stream: &UnixStream) -> Self
pub fn from_stream(stream: &UnixStream) -> Self
Attest the peer on the far end of stream.
Sourcepub fn from_unix_cred(pid: Option<u32>, uid: u32, gid: u32) -> Self
pub fn from_unix_cred(pid: Option<u32>, uid: u32, gid: u32) -> Self
Build peer information from already-captured Unix credentials.
tonic captures connection info before dispatching requests, so gRPC
handlers receive the credential facts through request extensions rather
than from the original UnixStream.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PeerInfo
impl RefUnwindSafe for PeerInfo
impl Send for PeerInfo
impl Sync for PeerInfo
impl Unpin for PeerInfo
impl UnsafeUnpin for PeerInfo
impl UnwindSafe for PeerInfo
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
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request