pub struct TlsClient { /* private fields */ }
Expand description
Primary class for creating and connecting clientside TLS sockets
Implementations§
Source§impl TlsClient
impl TlsClient
Sourcepub async fn new<T>(host: T) -> Result<Self>where
T: ToString,
pub async fn new<T>(host: T) -> Result<Self>where
T: ToString,
Returns a new TlsClient
struct, address resolution will occur at
creation. Connection attempts are performed later with calls to
TlsClient::connect
Sourcepub async fn set_cafile(&mut self, cafile: String)
pub async fn set_cafile(&mut self, cafile: String)
This function can be called if you need to set or use a certificate authority file instead of the defaults
Auto Trait Implementations§
impl Freeze for TlsClient
impl RefUnwindSafe for TlsClient
impl Send for TlsClient
impl Sync for TlsClient
impl Unpin for TlsClient
impl UnwindSafe for TlsClient
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