Struct futures_boring::ssl::SslMethod
source · pub struct SslMethod(/* private fields */);Expand description
A type specifying the kind of protocol an SslContext will speak.
Implementations§
source§impl SslMethod
impl SslMethod
sourcepub fn tls() -> SslMethod
pub fn tls() -> SslMethod
Support all versions of the TLS protocol.
This corresponds to TLS_method on OpenSSL 1.1.0 and SSLv23_method
on OpenSSL 1.0.x.
sourcepub fn dtls() -> SslMethod
pub fn dtls() -> SslMethod
Support all versions of the DTLS protocol.
This corresponds to DTLS_method on OpenSSL 1.1.0 and DTLSv1_method
on OpenSSL 1.0.x.
sourcepub fn tls_client() -> SslMethod
pub fn tls_client() -> SslMethod
Support all versions of the TLS protocol, explicitly as a client.
This corresponds to TLS_client_method on OpenSSL 1.1.0 and
SSLv23_client_method on OpenSSL 1.0.x.
sourcepub fn tls_server() -> SslMethod
pub fn tls_server() -> SslMethod
Support all versions of the TLS protocol, explicitly as a server.
This corresponds to TLS_server_method on OpenSSL 1.1.0 and
SSLv23_server_method on OpenSSL 1.0.x.
sourcepub unsafe fn from_ptr(ptr: *const ssl_method_st) -> SslMethod
pub unsafe fn from_ptr(ptr: *const ssl_method_st) -> SslMethod
Constructs an SslMethod from a pointer to the underlying OpenSSL value.
§Safety
The caller must ensure the pointer is valid.
sourcepub fn as_ptr(&self) -> *const ssl_method_st
pub fn as_ptr(&self) -> *const ssl_method_st
Returns a pointer to the underlying OpenSSL value.
Trait Implementations§
impl Copy for SslMethod
impl Send for SslMethod
impl Sync for SslMethod
Auto Trait Implementations§
impl Freeze for SslMethod
impl RefUnwindSafe for SslMethod
impl Unpin for SslMethod
impl UnwindSafe for SslMethod
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)