httpbis 0.9.1

Rust implementation of HTTP/2 protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::sync::Arc;

use tls_api::TlsAcceptor;

pub enum ServerTlsOption<A: TlsAcceptor> {
    Plain,
    Tls(Arc<A>),
}

impl<A: TlsAcceptor> Clone for ServerTlsOption<A> {
    fn clone(&self) -> Self {
        match self {
            &ServerTlsOption::Plain => ServerTlsOption::Plain,
            &ServerTlsOption::Tls(ref a) => ServerTlsOption::Tls(a.clone()),
        }
    }
}