pub struct SendHalf(_);
Implementations
sourceimpl SendHalf
impl SendHalf
sourcepub fn reunite(self, other: RecvHalf) -> Result<UdpSocket, ReuniteError>
pub fn reunite(self, other: RecvHalf) -> Result<UdpSocket, ReuniteError>
Attempts to put the two “halves” of a UdpSocket
back together and
recover the original socket. Succeeds only if the two “halves”
originated from the same call to UdpSocket::split
.
sourcepub async fn send_to(
&mut self,
buf: &[u8],
target: &SocketAddr
) -> Result<usize>
pub async fn send_to(
&mut self,
buf: &[u8],
target: &SocketAddr
) -> Result<usize>
Returns a future that sends data on the socket to the given address. On success, the future will resolve to the number of bytes written.
The future will resolve to an error if the IP version of the socket does
not match that of target
.
sourcepub async fn send(&mut self, buf: &[u8]) -> Result<usize>
pub async fn send(&mut self, buf: &[u8]) -> Result<usize>
Returns a future that sends data on the socket to the remote address to which it is connected. On success, the future will resolve to the number of bytes written.
The connect
method will connect this socket to a remote address. The future
will resolve to an error if the socket is not connected.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for SendHalf
impl Send for SendHalf
impl Sync for SendHalf
impl Unpin for SendHalf
impl !UnwindSafe for SendHalf
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more