pub struct PeerInfo { /* private fields */ }Expand description
Read-only peer metadata made available to security policies.
Implementations§
Source§impl PeerInfo
impl PeerInfo
Sourcepub fn new(address: SocketAddr, tls: bool) -> Self
pub fn new(address: SocketAddr, tls: bool) -> Self
Creates a new PeerInfo.
Sourcepub fn with_certificate_subject(self, subject: impl Into<CheetahString>) -> Self
pub fn with_certificate_subject(self, subject: impl Into<CheetahString>) -> Self
Sets certificate subject and returns the updated value.
Sourcepub fn address(&self) -> SocketAddr
pub fn address(&self) -> SocketAddr
Returns the address.
Sourcepub fn certificate_subject(&self) -> Option<&str>
pub fn certificate_subject(&self) -> Option<&str>
Returns the certificate subject.
Trait Implementations§
impl Eq for PeerInfo
impl StructuralPartialEq for PeerInfo
Auto Trait Implementations§
impl Freeze for PeerInfo
impl RefUnwindSafe for PeerInfo
impl Send for PeerInfo
impl Sync for PeerInfo
impl Unpin for PeerInfo
impl UnsafeUnpin for PeerInfo
impl UnwindSafe for PeerInfo
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