Struct amq_protocol_tcp::RustlsConnector
source · pub struct RustlsConnector(/* private fields */);
Expand description
The connector
Implementations§
source§impl RustlsConnector
impl RustlsConnector
sourcepub fn new_with_native_certs() -> Result<RustlsConnector, Error>
pub fn new_with_native_certs() -> Result<RustlsConnector, Error>
Create a new RustlsConnector
using the system certs (requires native-certs feature enabled)
§Errors
Returns an error if we fail to load the native certs.
sourcepub fn connect<S>(
&self,
domain: &str,
stream: S,
) -> Result<StreamOwned<ClientConnection, S>, HandshakeError<S>>
pub fn connect<S>( &self, domain: &str, stream: S, ) -> Result<StreamOwned<ClientConnection, S>, HandshakeError<S>>
Connect to the given host
§Errors
Returns a HandshakeError
containing either the current state of the handshake or the
failure when we couldn’t complete the hanshake
Trait Implementations§
source§impl Clone for RustlsConnector
impl Clone for RustlsConnector
source§fn clone(&self) -> RustlsConnector
fn clone(&self) -> RustlsConnector
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for RustlsConnector
impl Default for RustlsConnector
source§fn default() -> RustlsConnector
fn default() -> RustlsConnector
Returns the “default value” for a type. Read more
source§impl From<Arc<ClientConfig>> for RustlsConnector
impl From<Arc<ClientConfig>> for RustlsConnector
source§fn from(config: Arc<ClientConfig>) -> RustlsConnector
fn from(config: Arc<ClientConfig>) -> RustlsConnector
Converts to this type from the input type.
source§impl From<ClientConfig> for RustlsConnector
impl From<ClientConfig> for RustlsConnector
source§fn from(config: ClientConfig) -> RustlsConnector
fn from(config: ClientConfig) -> RustlsConnector
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RustlsConnector
impl !RefUnwindSafe for RustlsConnector
impl Send for RustlsConnector
impl Sync for RustlsConnector
impl Unpin for RustlsConnector
impl !UnwindSafe for RustlsConnector
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)