pub struct SocketDigest {
pub peer_addr: OnceCell<Option<SocketAddr>>,
pub local_addr: OnceCell<Option<SocketAddr>>,
pub original_dst: 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
original_dst: OnceCell<Option<SocketAddr>>
Original destination 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>
pub fn tcp_info(&self) -> Option<TCP_INFO>
pub fn get_recv_buf(&self) -> Option<usize>
pub fn original_dst(&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