pub struct MaybeDualstackSocket<S> { /* private fields */ }Implementations§
Source§impl<S> MaybeDualstackSocket<S>
impl<S> MaybeDualstackSocket<S>
pub fn socket(&self) -> &S
pub fn bind_addr(&self) -> SocketAddr
pub fn is_dualstack(&self) -> bool
Source§impl MaybeDualstackSocket<TcpListener>
impl MaybeDualstackSocket<TcpListener>
pub fn bind_tcp(addr: SocketAddr, opts: BindOpts<'_>) -> Result<Self>
pub async fn accept(&self) -> Result<(TcpStream, SocketAddr)>
Source§impl MaybeDualstackSocket<UdpSocket>
impl MaybeDualstackSocket<UdpSocket>
pub fn bind_udp(addr: SocketAddr, opts: BindOpts<'_>) -> Result<Self>
pub async fn recv_from(&self, buf: &mut [u8]) -> Result<(usize, SocketAddr)>
pub async fn send_to(&self, buf: &[u8], target: SocketAddr) -> Result<usize>
pub fn poll_send_to( &self, cx: &mut Context<'_>, buf: &[u8], target: SocketAddr, ) -> Poll<Result<usize>>
Auto Trait Implementations§
impl<S> Freeze for MaybeDualstackSocket<S>where
S: Freeze,
impl<S> RefUnwindSafe for MaybeDualstackSocket<S>where
S: RefUnwindSafe,
impl<S> Send for MaybeDualstackSocket<S>where
S: Send,
impl<S> Sync for MaybeDualstackSocket<S>where
S: Sync,
impl<S> Unpin for MaybeDualstackSocket<S>where
S: Unpin,
impl<S> UnwindSafe for MaybeDualstackSocket<S>where
S: UnwindSafe,
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