pub struct ServerBuilder { /* private fields */ }
Expand description
A builder type to simplify the creation of server-side SslStream
s.
Implementations§
source§impl ServerBuilder
impl ServerBuilder
sourcepub fn new(identity: &SecIdentity, certs: &[SecCertificate]) -> Self
pub fn new(identity: &SecIdentity, certs: &[SecCertificate]) -> Self
Creates a new ServerBuilder
which will use the specified identity
and certificate chain for handshakes.
sourcepub fn from_pkcs12(pkcs12_der: &[u8], passphrase: &str) -> Result<Self>
pub fn from_pkcs12(pkcs12_der: &[u8], passphrase: &str) -> Result<Self>
Creates a new ServerBuilder
which will use the identity
from the given PKCS #12 data.
This operation fails if PKCS #12 file contains zero or more than one identity.
This is a shortcut for the most common operation.
sourcepub fn new_ssl_context(&self) -> Result<SslContext>
pub fn new_ssl_context(&self) -> Result<SslContext>
Create a SSL context for lower-level stream initialization.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServerBuilder
impl RefUnwindSafe for ServerBuilder
impl Send for ServerBuilder
impl Sync for ServerBuilder
impl Unpin for ServerBuilder
impl UnwindSafe for ServerBuilder
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