Struct pingora_core::protocols::SocketDigest
source · pub struct SocketDigest {
pub peer_addr: OnceCell<Option<SocketAddr>>,
pub local_addr: OnceCell<Option<SocketAddr>>,
/* private fields */
}
Expand description
The interface to return socket-related information
Fields§
§peer_addr: OnceCell<Option<SocketAddr>>
Remote socket address
local_addr: OnceCell<Option<SocketAddr>>
Local socket address
Implementations§
source§impl SocketDigest
impl SocketDigest
pub fn from_raw_fd(raw_fd: RawFd) -> SocketDigest
pub fn peer_addr(&self) -> Option<&SocketAddr>
pub fn local_addr(&self) -> Option<&SocketAddr>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SocketDigest
impl RefUnwindSafe for SocketDigest
impl Send for SocketDigest
impl Sync for SocketDigest
impl Unpin for SocketDigest
impl UnwindSafe for SocketDigest
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