Trait rocket::listener::Connection

source ·
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§

source

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>

Implementors§

source§

impl Connection for TcpStream

source§

impl Connection for UnixStream

Available on Unix only.
source§

impl<C: Connection> Connection for TlsStream<C>

Available on crate feature tls only.