pub struct UdpSocket { /* private fields */ }Implementations§
Source§impl UdpSocket
impl UdpSocket
pub async fn with<F, R>(&self, f: F) -> R
pub async fn with_mutable<F, R>(&self, f: F) -> R
pub fn poll_with<F, R>(&self, context: &mut Context<'_>, f: F) -> Poll<R>
pub fn poll_with_mutable<F, R>( &self, context: &mut Context<'_>, f: F, ) -> Poll<R>
pub async fn bind(&mut self, port: Port) -> Result<()>
pub fn poll_send_to( &mut self, context: &mut Context<'_>, buffer: &[u8], metadata: &UdpMetadata, ) -> Poll<Result<()>>
pub fn poll_receive_from( &self, context: &mut Context<'_>, buffer: &mut [u8], ) -> Poll<Result<(usize, UdpMetadata)>>
pub async fn write_to( &mut self, buffer: &[u8], metadata: &UdpMetadata, ) -> Result<()>
pub async fn read_from(&self, buffer: &mut [u8]) -> Result<(usize, UdpMetadata)>
pub fn flush(&mut self) -> impl Future<Output = ()> + '_
pub async fn close(self)
pub async fn get_endpoint(&self) -> Result<(Option<IpAddress>, Port)>
pub async fn get_packet_read_capacity(&self) -> usize
pub async fn get_packet_write_capacity(&self) -> usize
pub async fn get_payload_read_capacity(&self) -> usize
pub async fn get_payload_write_capacity(&self) -> usize
pub async fn set_hop_limit(&mut self, hop_limit: Option<u8>)
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