pub struct ServerConfig { /* private fields */ }Implementations§
Source§impl ServerConfig
impl ServerConfig
Sourcepub fn new(
chain: Vec<CertificateDer<'static>>,
key: PrivateKeyDer<'static>,
alpn: Vec<Vec<u8>>,
unix_seconds: u64,
) -> Result<Self, Error>
pub fn new( chain: Vec<CertificateDer<'static>>, key: PrivateKeyDer<'static>, alpn: Vec<Vec<u8>>, unix_seconds: u64, ) -> Result<Self, Error>
Uses ring with the default ring feature, otherwise the process-default
provider; see with_provider.
Sourcepub fn with_provider(
provider: Arc<CryptoProvider>,
chain: Vec<CertificateDer<'static>>,
key: PrivateKeyDer<'static>,
alpn: Vec<Vec<u8>>,
unix_seconds: u64,
) -> Result<Self, Error>
pub fn with_provider( provider: Arc<CryptoProvider>, chain: Vec<CertificateDer<'static>>, key: PrivateKeyDer<'static>, alpn: Vec<Vec<u8>>, unix_seconds: u64, ) -> Result<Self, Error>
new with an explicit rustls crypto provider.
Sourcepub fn from_rustls(config: Arc<ServerConfig>, time: HostTime) -> Self
pub fn from_rustls(config: Arc<ServerConfig>, time: HostTime) -> Self
Wrap a rustls configuration the host built itself; see
ClientConfig::from_rustls for how time reaches certificate checks.
A ticketer the host configures may read its own clock.
pub fn rustls_config(&self) -> &Arc<ServerConfig> ⓘ
pub fn accept(&self) -> Result<Server, Error>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ServerConfig
impl !UnwindSafe for ServerConfig
impl Forget for ServerConfig
impl Freeze for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more