pub trait Connection:
AsyncRead
+ AsyncWrite
+ Send
+ Unpin {
// Required method
fn endpoint(&self) -> Result<Endpoint>;
// Provided method
fn certificates(&self) -> Option<Certificates<'_>> { ... }
}
Required Methods§
Provided Methods§
Sourcefn certificates(&self) -> Option<Certificates<'_>>
fn certificates(&self) -> Option<Certificates<'_>>
DER-encoded X.509 certificate chain presented by the client, if any.
The certificate order must be as it appears in the TLS protocol: the first certificate relates to the peer, the second certifies the first, the third certifies the second, and so on.
Defaults to an empty vector to indicate that no certificates were presented.
Implementations on Foreign Types§
Source§impl<A: Connection, B: Connection> Connection for Either<A, B>
impl<A: Connection, B: Connection> Connection for Either<A, B>
fn endpoint(&self) -> Result<Endpoint>
fn certificates(&self) -> Option<Certificates<'_>>
Implementors§
impl Connection for TcpStream
impl Connection for UnixStream
Available on Unix only.
impl<C: Connection> Connection for TlsStream<C>
Available on crate feature
tls
only.