pub struct Incoming { /* private fields */ }Expand description
The receiving end of a UdpTransport.
It stops yielding datagrams once the transport is dropped.
Implementations§
Source§impl Incoming
impl Incoming
Sourcepub fn recv(&self) -> Option<Datagram>
pub fn recv(&self) -> Option<Datagram>
Waits for the next datagram. Returns None once the transport is
closed.
Sourcepub fn recv_timeout(&self, timeout: Duration) -> Option<Datagram>
pub fn recv_timeout(&self, timeout: Duration) -> Option<Datagram>
Waits at most timeout for the next datagram.
Sourcepub fn handled(&self, user: usize)
pub fn handled(&self, user: usize)
Says that user datagrams of user traffic taken from here have
been handled. With a UserHandler, user traffic goes to it only
while none taken from here is still being handled, so that it is
handled in the order it came.
Trait Implementations§
Auto Trait Implementations§
impl !Sync for Incoming
impl Forget for Incoming
impl Freeze for Incoming
impl Move for Incoming
impl RefUnwindSafe for Incoming
impl Send for Incoming
impl Unpin for Incoming
impl UnsafeUnpin for Incomingwhere
*mut Counter<Channel<Datagram>>: UnsafeUnpin,
*mut Counter<Channel<Datagram>>: UnsafeUnpin,
*mut Counter<Channel<Datagram>>: UnsafeUnpin,
*const ArcInner<Atomic<usize>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<usize>>>: UnsafeUnpin,
impl UnwindSafe for Incoming
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