@@ -226,7 +226,7 @@ impl<'a> UdpSocket<'a> {
226226 ///
227227 /// This method will wait until the datagram has been sent.
228228 ///
229- /// If the socket's send buffer is too small to fit `buf`, this method will return `Poll::Ready( Err(SendError::Truncated) )`
229+ /// If the socket's send buffer is too small to fit `buf`, this method will return `Err(SendError::PacketTooLarge )`
230230 ///
231231 /// When the remote endpoint is not reachable, this method will return `Err(SendError::NoRoute)`
232232 pub async fn send_to < T > ( & self , buf : & [ u8 ] , remote_endpoint : T ) -> Result < ( ) , SendError >
@@ -244,7 +244,7 @@ impl<'a> UdpSocket<'a> {
244244 /// When the socket's send buffer is full, this method will return `Poll::Pending`
245245 /// and register the current task to be notified when the buffer has space available.
246246 ///
247- /// If the socket's send buffer is too small to fit `buf`, this method will return `Poll::Ready(Err(SendError::Truncated ))`
247+ /// If the socket's send buffer is too small to fit `buf`, this method will return `Poll::Ready(Err(SendError::PacketTooLarge ))`
248248 ///
249249 /// When the remote endpoint is not reachable, this method will return `Poll::Ready(Err(Error::NoRoute))`.
250250 pub fn poll_send_to < T > ( & self , buf : & [ u8 ] , remote_endpoint : T , cx : & mut Context < ' _ > ) -> Poll < Result < ( ) , SendError > >
@@ -280,7 +280,7 @@ impl<'a> UdpSocket<'a> {
280280 /// This method will wait until the buffer can fit the requested size before
281281 /// calling the function to fill its contents.
282282 ///
283- /// If the socket's send buffer is too small to fit `size`, this method will return `Poll::Ready( Err(SendError::Truncated) )`
283+ /// If the socket's send buffer is too small to fit `size`, this method will return `Err(SendError::PacketTooLarge )`
284284 ///
285285 /// When the remote endpoint is not reachable, this method will return `Err(SendError::NoRoute)`
286286 pub async fn send_to_with < T , F , R > ( & mut self , size : usize , remote_endpoint : T , f : F ) -> Result < R , SendError >
0 commit comments