Struct openstack::common::ResourceIterator
source · pub struct ResourceIterator<Q: ResourceQuery> { /* private fields */ }
Expand description
Generic implementation of a FallibleIterator
over resources.
Implementations
sourceimpl<Q> ResourceIterator<Q>where
Q: ResourceQuery,
impl<Q> ResourceIterator<Q>where
Q: ResourceQuery,
Trait Implementations
sourceimpl<Q: Clone + ResourceQuery> Clone for ResourceIterator<Q>where
Q::Item: Clone,
impl<Q: Clone + ResourceQuery> Clone for ResourceIterator<Q>where
Q::Item: Clone,
sourcefn clone(&self) -> ResourceIterator<Q>
fn clone(&self) -> ResourceIterator<Q>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<Q: Debug + ResourceQuery> Debug for ResourceIterator<Q>where
Q::Item: Debug,
impl<Q: Debug + ResourceQuery> Debug for ResourceIterator<Q>where
Q::Item: Debug,
sourceimpl<Q> FallibleIterator for ResourceIterator<Q>where
Q: ResourceQuery,
impl<Q> FallibleIterator for ResourceIterator<Q>where
Q: ResourceQuery,
type Item = <Q as ResourceQuery>::Item
type Item = <Q as ResourceQuery>::Item
The type being iterated over.
sourcefn next(&mut self) -> Result<Option<Self::Item>>
fn next(&mut self) -> Result<Option<Self::Item>>
Advances the iterator and returns the next value. Read more
sourcefn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
Returns bounds on the remaining length of the iterator. Read more
sourcefn all<F>(&mut self, f: F) -> Result<bool, Self::Error>where
Self: Sized,
F: FnMut(Self::Item) -> bool,
fn all<F>(&mut self, f: F) -> Result<bool, Self::Error>where
Self: Sized,
F: FnMut(Self::Item) -> bool,
Determines if all elements of this iterator match a predicate.
sourcefn and_then<F, B>(self, f: F) -> AndThen<Self, F>where
Self: Sized,
F: FnMut(Self::Item) -> Result<B, Self::Error>,
fn and_then<F, B>(self, f: F) -> AndThen<Self, F>where
Self: Sized,
F: FnMut(Self::Item) -> Result<B, Self::Error>,
Returns an iterator which applies a fallible transform to the elements
of the underlying iterator. Read more
sourcefn any<F>(&mut self, f: F) -> Result<bool, Self::Error>where
Self: Sized,
F: FnMut(Self::Item) -> bool,
fn any<F>(&mut self, f: F) -> Result<bool, Self::Error>where
Self: Sized,
F: FnMut(Self::Item) -> bool,
Determines if any element of this iterator matches a predicate.
sourcefn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Borrow an iterator rather than consuming it. Read more
sourcefn chain<I>(self, it: I) -> Chain<Self, I>where
I: IntoFallibleIterator<Item = Self::Item, Error = Self::Error>,
Self: Sized,
fn chain<I>(self, it: I) -> Chain<Self, I>where
I: IntoFallibleIterator<Item = Self::Item, Error = Self::Error>,
Self: Sized,
Returns an iterator which yields the elements of this iterator followed
by another. Read more
sourcefn cloned<'a, T>(self) -> Cloned<Self>where
Self: Sized + FallibleIterator<Item = &'a T>,
T: 'a + Clone,
fn cloned<'a, T>(self) -> Cloned<Self>where
Self: Sized + FallibleIterator<Item = &'a T>,
T: 'a + Clone,
Returns an iterator which clones all of its elements.
sourcefn count(self) -> Result<usize, Self::Error>where
Self: Sized,
fn count(self) -> Result<usize, Self::Error>where
Self: Sized,
Consumes the iterator, returning the number of remaining items.
sourcefn collect<T>(self) -> Result<T, Self::Error>where
T: FromFallibleIterator<Self::Item>,
Self: Sized,
fn collect<T>(self) -> Result<T, Self::Error>where
T: FromFallibleIterator<Self::Item>,
Self: Sized,
Transforms the iterator into a collection. Read more
sourcefn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Returns an iterator which yields the current iteration count as well
as the value. Read more
sourcefn filter<F>(self, f: F) -> Filter<Self, F>where
Self: Sized,
F: FnMut(&Self::Item) -> bool,
fn filter<F>(self, f: F) -> Filter<Self, F>where
Self: Sized,
F: FnMut(&Self::Item) -> bool,
Returns an iterator which uses a predicate to determine which values
should be yielded. Read more
sourcefn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>where
Self: Sized,
F: FnMut(Self::Item) -> Option<B>,
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>where
Self: Sized,
F: FnMut(Self::Item) -> Option<B>,
Returns an iterator which both filters and maps.
sourcefn find<F>(&mut self, f: F) -> Result<Option<Self::Item>, Self::Error>where
Self: Sized,
F: FnMut(&Self::Item) -> bool,
fn find<F>(&mut self, f: F) -> Result<Option<Self::Item>, Self::Error>where
Self: Sized,
F: FnMut(&Self::Item) -> bool,
Returns the first element of the iterator that matches a predicate.
sourcefn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where
Self: Sized,
Returns an iterator which yields this iterator’s elements and ends after
the first
Ok(None)
. Read moresourcefn fold<B, F>(self, init: B, f: F) -> Result<B, Self::Error>where
Self: Sized,
F: FnMut(B, Self::Item) -> B,
fn fold<B, F>(self, init: B, f: F) -> Result<B, Self::Error>where
Self: Sized,
F: FnMut(B, Self::Item) -> B,
Applies a function over the elements of the iterator, producing a single
final value. Read more
sourcefn iterator(self) -> Iterator<Self>where
Self: Sized,
fn iterator(self) -> Iterator<Self>where
Self: Sized,
Returns a normal (non-fallible) iterator over
Result<Item, Error>
.sourcefn last(self) -> Result<Option<Self::Item>, Self::Error>where
Self: Sized,
fn last(self) -> Result<Option<Self::Item>, Self::Error>where
Self: Sized,
Returns the last element of the iterator.
sourcefn map<B, F>(self, f: F) -> Map<Self, F>where
F: FnMut(Self::Item) -> B,
Self: Sized,
fn map<B, F>(self, f: F) -> Map<Self, F>where
F: FnMut(Self::Item) -> B,
Self: Sized,
Returns an iterator which applies a transform to the elements of the
underlying iterator. Read more
sourcefn map_err<B, F>(self, f: F) -> MapErr<Self, F>where
F: FnMut(Self::Error) -> B,
Self: Sized,
fn map_err<B, F>(self, f: F) -> MapErr<Self, F>where
F: FnMut(Self::Error) -> B,
Self: Sized,
Returns an iterator which applies a transform to the errors of the
underlying iterator. Read more
sourcefn max_by_key<B, F>(self, f: F) -> Result<Option<Self::Item>, Self::Error>where
Self: Sized,
B: Ord,
F: FnMut(&Self::Item) -> B,
fn max_by_key<B, F>(self, f: F) -> Result<Option<Self::Item>, Self::Error>where
Self: Sized,
B: Ord,
F: FnMut(&Self::Item) -> B,
Returns the element of the iterator which gives the maximum value from
the function. Read more
sourcefn min_by_key<B, F>(self, f: F) -> Result<Option<Self::Item>, Self::Error>where
Self: Sized,
B: Ord,
F: FnMut(&Self::Item) -> B,
fn min_by_key<B, F>(self, f: F) -> Result<Option<Self::Item>, Self::Error>where
Self: Sized,
B: Ord,
F: FnMut(&Self::Item) -> B,
Returns the element of the iterator which gives the minimum value from
the function. Read more
sourcefn nth(&mut self, n: usize) -> Result<Option<Self::Item>, Self::Error>
fn nth(&mut self, n: usize) -> Result<Option<Self::Item>, Self::Error>
Returns the
n
th element of the iterator.sourcefn peekable(self) -> Peekable<Self>where
Self: Sized,
fn peekable(self) -> Peekable<Self>where
Self: Sized,
Returns an iterator that can peek at the next element without consuming
it. Read more
sourcefn position<F>(&mut self, f: F) -> Result<Option<usize>, Self::Error>where
Self: Sized,
F: FnMut(Self::Item) -> bool,
fn position<F>(&mut self, f: F) -> Result<Option<usize>, Self::Error>where
Self: Sized,
F: FnMut(Self::Item) -> bool,
Returns the position of the first element of this iterator that matches
a predicate. Read more
sourcefn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
Returns an iterator that yields only the first
n
values of this
iterator. Read moresourcefn zip<I>(self, o: I) -> Zip<Self, <I as IntoFallibleIterator>::IntoIter>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
fn zip<I>(self, o: I) -> Zip<Self, <I as IntoFallibleIterator>::IntoIter>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Returns an iterator that yields pairs of this iterator’s and another
iterator’s values. Read more
sourcefn partial_cmp<I>(self, other: I) -> Result<Option<Ordering>, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
fn partial_cmp<I>(self, other: I) -> Result<Option<Ordering>, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
Lexicographically compares the elements of this iterator to that of
another. Read more
sourcefn eq<I>(self, other: I) -> Result<bool, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialEq<<I as IntoFallibleIterator>::Item>,
fn eq<I>(self, other: I) -> Result<bool, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialEq<<I as IntoFallibleIterator>::Item>,
Determines if the elements of this iterator are equal to those of
another. Read more
sourcefn ne<I>(self, other: I) -> Result<bool, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialEq<<I as IntoFallibleIterator>::Item>,
fn ne<I>(self, other: I) -> Result<bool, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialEq<<I as IntoFallibleIterator>::Item>,
Determines if the elements of this iterator are not equal to those of
another. Read more
sourcefn lt<I>(self, other: I) -> Result<bool, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
fn lt<I>(self, other: I) -> Result<bool, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
Determines if the elements of this iterator are lexicographically less
than those of another. Read more
sourcefn le<I>(self, other: I) -> Result<bool, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
fn le<I>(self, other: I) -> Result<bool, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
Determines if the elements of this iterator are lexicographically less
than or equal to those of another. Read more
sourcefn gt<I>(self, other: I) -> Result<bool, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
fn gt<I>(self, other: I) -> Result<bool, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
Determines if the elements of this iterator are lexicographically
greater than those of another. Read more
sourcefn ge<I>(self, other: I) -> Result<bool, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
fn ge<I>(self, other: I) -> Result<bool, Self::Error>where
Self: Sized,
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
Determines if the elements of this iterator are lexicographically
greater than or equal to those of another. Read more
Auto Trait Implementations
impl<Q> RefUnwindSafe for ResourceIterator<Q>where
Q: RefUnwindSafe,
<Q as ResourceQuery>::Item: RefUnwindSafe,
impl<Q> Send for ResourceIterator<Q>where
Q: Send,
<Q as ResourceQuery>::Item: Send,
impl<Q> Sync for ResourceIterator<Q>where
Q: Sync,
<Q as ResourceQuery>::Item: Sync,
impl<Q> Unpin for ResourceIterator<Q>where
Q: Unpin,
<Q as ResourceQuery>::Item: Unpin,
impl<Q> UnwindSafe for ResourceIterator<Q>where
Q: UnwindSafe,
<Q as ResourceQuery>::Item: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<I> IntoFallibleIterator for Iwhere
I: FallibleIterator,
impl<I> IntoFallibleIterator for Iwhere
I: FallibleIterator,
type Item = <I as FallibleIterator>::Item
type Item = <I as FallibleIterator>::Item
The elements of the iterator.
type Error = <I as FallibleIterator>::Error
type Error = <I as FallibleIterator>::Error
The error value of the iterator.
type IntoIter = I
type IntoIter = I
The iterator.
sourcefn into_fallible_iterator(self) -> I
fn into_fallible_iterator(self) -> I
Creates a fallible iterator from a value.