Skip to main content

FetchPeerCredentials

Trait FetchPeerCredentials 

Source
pub trait FetchPeerCredentials {
    // Required method
    fn fetch_peer_credentials(
        &self,
    ) -> impl Future<Output = Result<Credentials, Error>>;
}
Expand description

Trait for fetching peer credentials from a socket.

This trait provides the low-level capability to fetch credentials from a socket’s underlying file descriptor. It is typically implemented by socket read halves that support credentials.

Required Methods§

Source

fn fetch_peer_credentials( &self, ) -> impl Future<Output = Result<Credentials, Error>>

Fetch the peer credentials for this socket.

This is the low-level method that socket implementations should override to provide peer credentials. Higher-level APIs should use super::Connection::peer_credentials instead.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> FetchPeerCredentials for T
where T: UnixSocket,

Available on crate feature std only.