[−][src]Struct tokio_net::udp::split::UdpSocketSendHalf
Methods
impl UdpSocketSendHalf
[src]
pub fn reunite(
self,
other: UdpSocketRecvHalf
) -> Result<UdpSocket, ReuniteError>
[src]
self,
other: UdpSocketRecvHalf
) -> 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
.
pub async fn send_to<'_, '_, '_>(
&'_ mut self,
buf: &'_ [u8],
target: &'_ SocketAddr
) -> Result<usize>
[src]
&'_ 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
.
pub async fn send<'_, '_>(&'_ mut self, buf: &'_ [u8]) -> Result<usize>
[src]
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
impl AsRef<UdpSocket> for UdpSocketSendHalf
[src]
impl Debug for UdpSocketSendHalf
[src]
Auto Trait Implementations
impl Send for UdpSocketSendHalf
impl Sync for UdpSocketSendHalf
impl Unpin for UdpSocketSendHalf
impl !UnwindSafe for UdpSocketSendHalf
impl !RefUnwindSafe for UdpSocketSendHalf
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,