rocket::listener

Trait 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.