pub struct DisconnectedPacketConn { /* private fields */ }
Expand description
Since UDP is connectionless, as a server, it doesn’t know how to reply
simply using the Write
method. So, to make it work, disconnectedPacketConn
will infer the last packet that it reads as the reply address for Write
Implementations
Trait Implementations
sourceimpl Conn for DisconnectedPacketConn
impl Conn for DisconnectedPacketConn
fn connect<'life0, 'async_trait>(
&'life0 self,
addr: SocketAddr
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn recv<'life0, 'life1, 'async_trait>(
&'life0 self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn recv_from<'life0, 'life1, 'async_trait>(
&'life0 self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr)>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
buf: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn send_to<'life0, 'life1, 'async_trait>(
&'life0 self,
buf: &'life1 [u8],
target: SocketAddr
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn local_addr<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<SocketAddr>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn remote_addr<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<SocketAddr>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl !RefUnwindSafe for DisconnectedPacketConn
impl Send for DisconnectedPacketConn
impl Sync for DisconnectedPacketConn
impl Unpin for DisconnectedPacketConn
impl !UnwindSafe for DisconnectedPacketConn
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more