pub struct UdpSocket { /* private fields */ }Implementations§
Source§impl UdpSocket
impl UdpSocket
pub fn bind(addr: SocketAddr) -> Result<Self>
pub fn bind_to_device(addr: SocketAddr, device: BoundDevice) -> Result<Self>
pub fn local_addr(&self) -> Result<SocketAddr>
pub fn bound_device(&self) -> Option<&BoundDevice>
pub fn poll_send_ready(&self, cx: &mut Context<'_>) -> Poll<Result<()>>
pub fn poll_recv_ready(&self, cx: &mut Context<'_>) -> Poll<Result<()>>
pub fn poll_send( &self, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], line: &Line, ) -> Poll<Result<usize>>
pub fn poll_recv( &self, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>], lines: &mut [Line], ) -> Poll<Result<usize>>
pub fn bind_device(&self, device: &str) -> Result<()>
Trait Implementations§
Source§impl Io for UdpSocket
impl Io for UdpSocket
fn config(socket: &Socket, addr: SocketAddr) -> Result<()>
fn bind_device_to_socket( socket: &SockRef<'_>, addr: SocketAddr, device: &BoundDevice, ) -> Result<()>
fn sendmsg(&self, buffers: &[IoSlice<'_>], line: &Line) -> Result<usize>
fn recvmsg( &self, bufs: &mut [IoSliceMut<'_>], recv_lines: &mut [Line], ) -> Result<usize>
fn set_ttl(&self, ttl: i32) -> Result<()>
Auto Trait Implementations§
impl !Freeze for UdpSocket
impl RefUnwindSafe for UdpSocket
impl Send for UdpSocket
impl Sync for UdpSocket
impl Unpin for UdpSocket
impl UnsafeUnpin for UdpSocket
impl UnwindSafe for UdpSocket
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