pub struct UdpPipeLine { /* private fields */ }Implementations§
Source§impl UdpPipeLine
impl UdpPipeLine
Source§impl UdpPipeLine
impl UdpPipeLine
Sourcepub async fn send_to_addr<A: Into<SocketAddr>>(
&self,
buf: &[u8],
addr: A,
) -> Result<()>
pub async fn send_to_addr<A: Into<SocketAddr>>( &self, buf: &[u8], addr: A, ) -> Result<()>
Writing buf to the target denoted by SocketAddr via this pipeline
Sourcepub fn try_send_to_addr<A: Into<SocketAddr>>(
&self,
buf: &[u8],
addr: A,
) -> Result<()>
pub fn try_send_to_addr<A: Into<SocketAddr>>( &self, buf: &[u8], addr: A, ) -> Result<()>
Try to write buf to the target denoted by SocketAddr via this pipeline
pub async fn send_buf_to( &self, buf: BytesMut, route_key: &RouteKey, ) -> Result<()>
Sourcepub async fn recv_from(
&mut self,
buf: &mut [u8],
) -> Option<Result<(usize, RouteKey)>>
pub async fn recv_from( &mut self, buf: &mut [u8], ) -> Option<Result<(usize, RouteKey)>>
Receving buf from this PipeLine
usize in the Ok branch indicates how many bytes are received
RouteKey in the Ok branch denotes the source where these bytes are received from
pub async fn recv_multi_from<B: AsMut<[u8]>>( &mut self, bufs: &mut [B], sizes: &mut [usize], addrs: &mut [RouteKey], ) -> Option<Result<usize>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UdpPipeLine
impl !RefUnwindSafe for UdpPipeLine
impl Send for UdpPipeLine
impl Sync for UdpPipeLine
impl Unpin for UdpPipeLine
impl !UnwindSafe for UdpPipeLine
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