pub struct UdpSocket { /* private fields */ }
Implementations§
Source§impl UdpSocket
impl UdpSocket
pub fn capabilities() -> Result<UdpCapabilities>
pub fn bind(addr: SocketAddr) -> Result<Self>
pub fn socket_type(&self) -> SocketType
pub fn local_addr(&self) -> Result<SocketAddr>
pub fn ttl(&self) -> Result<u8>
pub fn set_ttl(&self, ttl: u8) -> Result<()>
pub fn poll_send( &self, cx: &mut Context<'_>, transmits: &[Transmit], ) -> Poll<Result<usize>>
pub fn poll_recv( &self, cx: &mut Context<'_>, buffers: &mut [IoSliceMut<'_>], meta: &mut [RecvMeta], ) -> Poll<Result<usize>>
pub async fn send(&self, transmits: &[Transmit]) -> Result<usize>
pub async fn recv( &self, buffers: &mut [IoSliceMut<'_>], meta: &mut [RecvMeta], ) -> Result<usize>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UdpSocket
impl RefUnwindSafe for UdpSocket
impl Send for UdpSocket
impl Sync for UdpSocket
impl Unpin 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