Struct libp2p_core::connection::EstablishedConnectionIter
source · [−]pub struct EstablishedConnectionIter<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr> { /* private fields */ }
Expand description
An iterator over established connections in a pool.
Implementations
sourceimpl<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr> EstablishedConnectionIter<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr> where
I: Iterator<Item = ConnectionId>,
impl<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr> EstablishedConnectionIter<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr> where
I: Iterator<Item = ConnectionId>,
sourcepub fn next(&mut self) -> Option<EstablishedConnection<'_, TInEvent>>
pub fn next(&mut self) -> Option<EstablishedConnection<'_, TInEvent>>
Obtains the next connection, if any.
sourcepub fn into_ids(self) -> impl Iterator<Item = ConnectionId>
pub fn into_ids(self) -> impl Iterator<Item = ConnectionId>
Turns the iterator into an iterator over just the connection IDs.
sourcepub fn into_first<'b>(self) -> Option<EstablishedConnection<'b, TInEvent>> where
'a: 'b,
pub fn into_first<'b>(self) -> Option<EstablishedConnection<'b, TInEvent>> where
'a: 'b,
Returns the first connection, if any, consuming the iterator.
Auto Trait Implementations
impl<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr> !RefUnwindSafe for EstablishedConnectionIter<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr>
impl<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr> Send for EstablishedConnectionIter<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr> where
I: Send,
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
TTransErr: Send,
impl<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr> !Sync for EstablishedConnectionIter<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr>
impl<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr> Unpin for EstablishedConnectionIter<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr> where
I: Unpin,
impl<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr> !UnwindSafe for EstablishedConnectionIter<'a, I, TInEvent, TOutEvent, THandler, TTransErr, THandlerErr>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more