pub struct UdpTraffic {
pub from: SocketAddr,
pub data: Bytes,
}
Fields§
§from: SocketAddr
§data: Bytes
Implementations§
Source§impl UdpTraffic
impl UdpTraffic
pub async fn write<T: AsyncWrite + Unpin>(&self, writer: &mut T) -> Result<()>
pub async fn write_slice<T: AsyncWrite + Unpin>( writer: &mut T, from: SocketAddr, data: &[u8], ) -> Result<()>
pub async fn read<T: AsyncRead + Unpin>( reader: &mut T, hdr_len: u8, ) -> Result<UdpTraffic>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for UdpTraffic
impl RefUnwindSafe for UdpTraffic
impl Send for UdpTraffic
impl Sync for UdpTraffic
impl Unpin for UdpTraffic
impl UnwindSafe for UdpTraffic
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