pub struct SessionAuthConfig { /* private fields */ }Expand description
Session-level handshake authentication configuration.
Implementations§
Source§impl SessionAuthConfig
impl SessionAuthConfig
Sourcepub fn with_local_identity(self, identity: IdentityKeyPair) -> Self
pub fn with_local_identity(self, identity: IdentityKeyPair) -> Self
Attaches a local identity used to sign native handshake messages.
Sourcepub fn with_peer_identity(self, identity: PeerIdentity) -> Self
pub fn with_peer_identity(self, identity: PeerIdentity) -> Self
Pins the expected remote identity public key.
Sourcepub fn require_peer_authentication(self, require: bool) -> Self
pub fn require_peer_authentication(self, require: bool) -> Self
Requires the remote side to present a valid authenticated handshake.
Sourcepub fn local_identity(&self) -> Option<&IdentityKeyPair>
pub fn local_identity(&self) -> Option<&IdentityKeyPair>
Returns the local identity, if configured.
Sourcepub fn peer_identity(&self) -> Option<PeerIdentity>
pub fn peer_identity(&self) -> Option<PeerIdentity>
Returns the pinned peer identity, if configured.
Sourcepub fn requires_peer_authentication(&self) -> bool
pub fn requires_peer_authentication(&self) -> bool
Returns whether remote handshake authentication is mandatory.
Trait Implementations§
Source§impl Clone for SessionAuthConfig
impl Clone for SessionAuthConfig
Source§fn clone(&self) -> SessionAuthConfig
fn clone(&self) -> SessionAuthConfig
Returns a duplicate 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 Debug for SessionAuthConfig
impl Debug for SessionAuthConfig
Source§impl Default for SessionAuthConfig
impl Default for SessionAuthConfig
Source§fn default() -> SessionAuthConfig
fn default() -> SessionAuthConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for SessionAuthConfig
impl PartialEq for SessionAuthConfig
impl Eq for SessionAuthConfig
impl StructuralPartialEq for SessionAuthConfig
Auto Trait Implementations§
impl Freeze for SessionAuthConfig
impl RefUnwindSafe for SessionAuthConfig
impl Send for SessionAuthConfig
impl Sync for SessionAuthConfig
impl Unpin for SessionAuthConfig
impl UnsafeUnpin for SessionAuthConfig
impl UnwindSafe for SessionAuthConfig
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