pub struct Tls { /* private fields */ }Expand description
The TLS method: client and server configurations, each optional, that start handshakes.
let method = coqui_peer_tls::Tls::new()
.client(std::sync::Arc::new(client))
.server(std::sync::Arc::new(server));Implementations§
Trait Implementations§
Source§impl Method for Tls
impl Method for Tls
Source§type Handshake = TlsHandshake
type Handshake = TlsHandshake
The handshake this method runs.
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
The method name: lowercase letters, digits and
-, as in KeyMaterial::method.Source§fn initiate(&self) -> Result<TlsHandshake, PeerError>
fn initiate(&self) -> Result<TlsHandshake, PeerError>
Starts a handshake as the side that dials. Read more
Source§fn respond(&self, source: Option<SocketAddr>) -> Result<TlsHandshake, PeerError>
fn respond(&self, source: Option<SocketAddr>) -> Result<TlsHandshake, PeerError>
Starts a handshake as the side that accepts.
source is where the peer connected from;
it is recorded with a waiting entry. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Tls
impl !UnwindSafe for Tls
impl Freeze for Tls
impl Send for Tls
impl Sync for Tls
impl Unpin for Tls
impl UnsafeUnpin for Tls
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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