pub struct TcpSocketIter<'a, 'd> { /* private fields */ }Expand description
Iterator over the TCP sockets of a Stack, returned by Stack::tcp_sockets.
Each item borrows the stack, so only one can exist at a time. That is why this is
not an Iterator and cannot be used in a for loop. Use while let:
let mut iter = stack.tcp_sockets();
while let Some((handle, item)) = iter.next() {
let _ = (handle, item.state());
}Implementations§
Auto Trait Implementations§
impl<'a, 'd> !RefUnwindSafe for TcpSocketIter<'a, 'd>
impl<'a, 'd> !Send for TcpSocketIter<'a, 'd>
impl<'a, 'd> !Sync for TcpSocketIter<'a, 'd>
impl<'a, 'd> !UnwindSafe for TcpSocketIter<'a, 'd>
impl<'a, 'd> Freeze for TcpSocketIter<'a, 'd>
impl<'a, 'd> Unpin for TcpSocketIter<'a, 'd>
impl<'a, 'd> UnsafeUnpin for TcpSocketIter<'a, 'd>
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