pub struct PooledLendingIteratorAdapter<I: PooledIterator> { /* private fields */ }lending-iterator only.Expand description
An adapter for PooledIterator which implements lending_iterator::LendingIterator.
To avoid conflicts between LendingIterator::next and PooledIterator::next,
the PooledIterator is not implemented for the adapter; however, the other cursor methods
(valid, current, prev) are implemented if I: CursorPooledIterator, and Seekable
is implemented if I: Seekable.
Implementations§
Source§impl<I: PooledIterator> PooledLendingIteratorAdapter<I>
impl<I: PooledIterator> PooledLendingIteratorAdapter<I>
Sourcepub fn into_inner(self) -> I
pub fn into_inner(self) -> I
Convert the adapter back into the inner iterator.
Source§impl<I: CursorPooledIterator> PooledLendingIteratorAdapter<I>
impl<I: CursorPooledIterator> PooledLendingIteratorAdapter<I>
Sourcepub fn valid(&self) -> bool
pub fn valid(&self) -> bool
Determine whether the iterator is currently at any value in the collection.
Sourcepub const fn current(&self) -> Option<Item<'_, Self>>
pub const fn current(&self) -> Option<Item<'_, Self>>
Get the current value the iterator is at.
This is cheap, and does not require getting a new buffer.
Trait Implementations§
Source§impl<I: Clone + PooledIterator> Clone for PooledLendingIteratorAdapter<I>
impl<I: Clone + PooledIterator> Clone for PooledLendingIteratorAdapter<I>
Source§fn clone(&self) -> PooledLendingIteratorAdapter<I>
fn clone(&self) -> PooledLendingIteratorAdapter<I>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<I: Debug + PooledIterator> Debug for PooledLendingIteratorAdapter<I>
impl<I: Debug + PooledIterator> Debug for PooledLendingIteratorAdapter<I>
Source§impl<'next, I: PooledIterator> LendingIteratorඞItem<'next> for PooledLendingIteratorAdapter<I>
impl<'next, I: PooledIterator> LendingIteratorඞItem<'next> for PooledLendingIteratorAdapter<I>
type T = &'next <I as PooledIterator>::Item
Source§impl<I: PooledIterator> LendingIterator for PooledLendingIteratorAdapter<I>
impl<I: PooledIterator> LendingIterator for PooledLendingIteratorAdapter<I>
Source§fn filter<F>(self, should_yield: F) -> Filter<Self, F>
fn filter<F>(self, should_yield: F) -> Filter<Self, F>
LendingIterator counterpart of Iterator::filter().Source§fn for_each(self, f: impl FnMut(Self::T))where
Self: Sized,
fn for_each(self, f: impl FnMut(Self::T))where
Self: Sized,
LendingIterator counterpart of Iterator::for_each().Source§fn fold<Acc>(self, acc: Acc, f: impl FnMut(Acc, Self::T) -> Acc) -> Accwhere
Self: Sized,
fn fold<Acc>(self, acc: Acc, f: impl FnMut(Acc, Self::T) -> Acc) -> Accwhere
Self: Sized,
LendingIterator counterpart of Iterator::fold().Source§fn try_for_each<Err>(
&mut self,
f: impl FnMut(Self::T) -> Result<(), Err>,
) -> Result<(), Err>
fn try_for_each<Err>( &mut self, f: impl FnMut(Self::T) -> Result<(), Err>, ) -> Result<(), Err>
LendingIterator counterpart of Iterator::try_for_each().Source§fn try_fold<Acc, Err>(
&mut self,
acc: Acc,
f: impl FnMut(Acc, Self::T) -> Result<Acc, Err>,
) -> Result<Acc, Err>
fn try_fold<Acc, Err>( &mut self, acc: Acc, f: impl FnMut(Acc, Self::T) -> Result<Acc, Err>, ) -> Result<Acc, Err>
LendingIterator counterpart of Iterator::try_fold().Source§fn all(&mut self, predicate: impl FnMut(Self::T) -> bool) -> boolwhere
Self: Sized,
fn all(&mut self, predicate: impl FnMut(Self::T) -> bool) -> boolwhere
Self: Sized,
LendingIterator counterpart of Iterator::all().Source§fn any(&mut self, predicate: impl FnMut(Self::T) -> bool) -> boolwhere
Self: Sized,
fn any(&mut self, predicate: impl FnMut(Self::T) -> bool) -> boolwhere
Self: Sized,
LendingIterator counterpart of Iterator::any().Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
LendingIterator counterpart of Iterator::by_ref().Source§fn count(self) -> usizewhere
Self: Sized,
fn count(self) -> usizewhere
Self: Sized,
LendingIterator counterpart of Iterator::count().Source§fn find<'find>(
&'find mut self,
predicate: impl FnMut(&Self::T) -> bool + 'find,
) -> Option<Self::T>where
Self: Sized,
fn find<'find>(
&'find mut self,
predicate: impl FnMut(&Self::T) -> bool + 'find,
) -> Option<Self::T>where
Self: Sized,
LendingIterator counterpart of Iterator::find().Source§fn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where
Self: Sized,
LendingIterator counterpart of Iterator::fuse().Source§fn nth(&mut self, n: usize) -> Option<Self::T>
fn nth(&mut self, n: usize) -> Option<Self::T>
LendingIterator counterpart of Iterator::nth().Source§fn position<F>(
&mut self,
predicate: impl FnMut(Self::T) -> bool,
) -> Option<usize>where
Self: Sized,
fn position<F>(
&mut self,
predicate: impl FnMut(Self::T) -> bool,
) -> Option<usize>where
Self: Sized,
LendingIterator counterpart of Iterator::position().Source§fn skip(self, count: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, count: usize) -> Skip<Self>where
Self: Sized,
LendingIterator counterpart of Iterator::skip().Source§fn take(self, count: usize) -> Take<Self>where
Self: Sized,
fn take(self, count: usize) -> Take<Self>where
Self: Sized,
LendingIterator counterpart of Iterator::take().Source§fn map_to_ref<R, F>(
self,
f: F,
) -> Map<Self, F, HKT<dyn for<'ඞ> WithLifetime<'ඞ, T = &'ඞ R>>>
fn map_to_ref<R, F>( self, f: F, ) -> Map<Self, F, HKT<dyn for<'ඞ> WithLifetime<'ඞ, T = &'ඞ R>>>
Source§fn map_to_mut<R, F>(
self,
f: F,
) -> Map<Self, F, HKT<dyn for<'ඞ> WithLifetime<'ඞ, T = &'ඞ mut R>>>
fn map_to_mut<R, F>( self, f: F, ) -> Map<Self, F, HKT<dyn for<'ඞ> WithLifetime<'ඞ, T = &'ඞ mut R>>>
Source§fn map_into_iter<F, NonLendingItem>(self, f: F) -> MapIntoIter<Self, F>
fn map_into_iter<F, NonLendingItem>(self, f: F) -> MapIntoIter<Self, F>
.map…(…).into_iter(). Read moreSource§fn filter_map<NewItemType, F>(self, f: F) -> FilterMap<Self, F, NewItemType>
fn filter_map<NewItemType, F>(self, f: F) -> FilterMap<Self, F, NewItemType>
Source§fn filter_map_to_ref<R, F>(
self,
f: F,
) -> FilterMap<Self, F, HKT<dyn for<'ඞ> WithLifetime<'ඞ, T = &'ඞ R>>>
fn filter_map_to_ref<R, F>( self, f: F, ) -> FilterMap<Self, F, HKT<dyn for<'ඞ> WithLifetime<'ඞ, T = &'ඞ R>>>
.filter_map(), but for hard-coding the
HKT parameter to HKTRef<R> = HKT!(&R). Read moreSource§fn filter_map_to_mut<R, F>(
self,
f: F,
) -> FilterMap<Self, F, HKT<dyn for<'ඞ> WithLifetime<'ඞ, T = &'ඞ mut R>>>
fn filter_map_to_mut<R, F>( self, f: F, ) -> FilterMap<Self, F, HKT<dyn for<'ඞ> WithLifetime<'ඞ, T = &'ඞ mut R>>>
.filter_map(), but for hard-coding the
HKT parameter to HKTRefMut<R> = HKT!(&mut R). Read moreSource§fn filter_map_into_iter<F, NonLendingItem>(
self,
f: F,
) -> FilterMapIntoIter<Self, F>
fn filter_map_into_iter<F, NonLendingItem>( self, f: F, ) -> FilterMapIntoIter<Self, F>
.filter_map…(…).into_iter(). Read moreSource§impl<I: PartialEq + PooledIterator> PartialEq for PooledLendingIteratorAdapter<I>
impl<I: PartialEq + PooledIterator> PartialEq for PooledLendingIteratorAdapter<I>
Source§fn eq(&self, other: &PooledLendingIteratorAdapter<I>) -> bool
fn eq(&self, other: &PooledLendingIteratorAdapter<I>) -> bool
self and other values to be equal, and is used by ==.Source§impl<Key, Cmp, I> Seekable<Key, Cmp> for PooledLendingIteratorAdapter<I>
impl<Key, Cmp, I> Seekable<Key, Cmp> for PooledLendingIteratorAdapter<I>
Source§fn reset(&mut self)
fn reset(&mut self)
Source§fn seek(&mut self, min_bound: &Key)
fn seek(&mut self, min_bound: &Key)
min_bound. Read moreSource§fn seek_before(&mut self, strict_upper_bound: &Key)
fn seek_before(&mut self, strict_upper_bound: &Key)
strict_upper_bound. Read moreSource§fn seek_to_first(&mut self)
fn seek_to_first(&mut self)
Source§fn seek_to_last(&mut self)
fn seek_to_last(&mut self)
impl<I: Eq + PooledIterator> Eq for PooledLendingIteratorAdapter<I>
impl<I: PooledIterator> StructuralPartialEq for PooledLendingIteratorAdapter<I>
Auto Trait Implementations§
impl<I> Freeze for PooledLendingIteratorAdapter<I>
impl<I> RefUnwindSafe for PooledLendingIteratorAdapter<I>
impl<I> Send for PooledLendingIteratorAdapter<I>
impl<I> Sync for PooledLendingIteratorAdapter<I>
impl<I> Unpin for PooledLendingIteratorAdapter<I>
impl<I> UnwindSafe for PooledLendingIteratorAdapter<I>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FragileContainer<T> for Twhere
T: ?Sized,
impl<T> FragileContainer<T> for Twhere
T: ?Sized,
Source§fn get_ref(&self) -> <T as FragileTryContainer<T>>::Ref<'_>
fn get_ref(&self) -> <T as FragileTryContainer<T>>::Ref<'_>
Infallibly get immutable access to the T.
Source§impl<T> FragileMutContainer<T> for Twhere
T: ?Sized,
impl<T> FragileMutContainer<T> for Twhere
T: ?Sized,
Source§fn get_mut(&mut self) -> <T as FragileTryMutContainer<T>>::RefMut<'_>
fn get_mut(&mut self) -> <T as FragileTryMutContainer<T>>::RefMut<'_>
Infallibly get mutable access to the T.
Source§impl<T> FragileTryContainer<T> for Twhere
T: ?Sized,
impl<T> FragileTryContainer<T> for Twhere
T: ?Sized,
Source§fn into_inner(self) -> Option<T>
fn into_inner(self) -> Option<T>
Infallibly get the T.
Source§fn try_get_ref(
&self,
) -> Result<<T as FragileTryContainer<T>>::Ref<'_>, <T as FragileTryContainer<T>>::RefError>
fn try_get_ref( &self, ) -> Result<<T as FragileTryContainer<T>>::Ref<'_>, <T as FragileTryContainer<T>>::RefError>
Infallibly get immutable access to the T.
Source§type RefError = Infallible
type RefError = Infallible
try_get_ref. This type should implement
std::error::Error. Read moreSource§fn new_container(t: T) -> T
fn new_container(t: T) -> T
T.Source§impl<T> FragileTryMutContainer<T> for Twhere
T: ?Sized,
impl<T> FragileTryMutContainer<T> for Twhere
T: ?Sized,
Source§fn try_get_mut(
&mut self,
) -> Result<<T as FragileTryMutContainer<T>>::RefMut<'_>, <T as FragileTryMutContainer<T>>::RefMutError>
fn try_get_mut( &mut self, ) -> Result<<T as FragileTryMutContainer<T>>::RefMut<'_>, <T as FragileTryMutContainer<T>>::RefMutError>
Infallibly get mutable access to the T.
Source§type RefMut<'a> = &'a mut T
where
T: 'a
type RefMut<'a> = &'a mut T where T: 'a
Source§type RefMutError = Infallible
type RefMutError = Infallible
try_get_mut. This type should implement
std::error::Error. Read more