[−][src]Struct openstack::common::ResourceIterator
Generic implementation of a FallibleIterator
over resources.
Implementations
impl<Q> ResourceIterator<Q> where
Q: ResourceQuery,
[src]
Q: ResourceQuery,
pub fn one(self) -> Result<Q::Item>
[src]
Assert that only one item is left and fetch it.
Fails with ResourceNotFound
if no items are left and with
TooManyItems
if there is more than one item left.
Trait Implementations
impl<Q: Clone + ResourceQuery> Clone for ResourceIterator<Q> where
Q::Item: Clone,
[src]
Q::Item: Clone,
fn clone(&self) -> ResourceIterator<Q>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<Q: Debug + ResourceQuery> Debug for ResourceIterator<Q> where
Q::Item: Debug,
[src]
Q::Item: Debug,
impl<Q> FallibleIterator for ResourceIterator<Q> where
Q: ResourceQuery,
[src]
Q: ResourceQuery,
type Item = Q::Item
The type being iterated over.
type Error = Error
The error type.
fn next(&mut self) -> Result<Option<Self::Item>>
[src]
fn size_hint(&self) -> (usize, Option<usize>)
[src]
fn count(self) -> Result<usize, Self::Error>
[src]
fn last(self) -> Result<Option<Self::Item>, Self::Error>
[src]
fn nth(&mut self, n: usize) -> Result<Option<Self::Item>, Self::Error>
[src]
fn step_by(self, step: usize) -> StepBy<Self>
[src]
fn chain<I>(self, it: I) -> Chain<Self, I> where
I: IntoFallibleIterator<Item = Self::Item, Error = Self::Error>,
[src]
I: IntoFallibleIterator<Item = Self::Item, Error = Self::Error>,
fn zip<I>(
self,
o: I
) -> Zip<Self, <I as IntoFallibleIterator>::IntoFallibleIter> where
I: IntoFallibleIterator<Error = Self::Error>,
[src]
self,
o: I
) -> Zip<Self, <I as IntoFallibleIterator>::IntoFallibleIter> where
I: IntoFallibleIterator<Error = Self::Error>,
fn map<F, B>(self, f: F) -> Map<Self, F> where
F: FnMut(Self::Item) -> Result<B, Self::Error>,
[src]
F: FnMut(Self::Item) -> Result<B, Self::Error>,
fn for_each<F>(self, f: F) -> Result<(), Self::Error> where
F: FnMut(Self::Item) -> Result<(), Self::Error>,
[src]
F: FnMut(Self::Item) -> Result<(), Self::Error>,
fn filter<F>(self, f: F) -> Filter<Self, F> where
F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
[src]
F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where
F: FnMut(Self::Item) -> Result<Option<B>, Self::Error>,
[src]
F: FnMut(Self::Item) -> Result<Option<B>, Self::Error>,
fn enumerate(self) -> Enumerate<Self>
[src]
fn peekable(self) -> Peekable<Self>
[src]
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where
P: FnMut(&Self::Item) -> Result<bool, Self::Error>,
[src]
P: FnMut(&Self::Item) -> Result<bool, Self::Error>,
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where
P: FnMut(&Self::Item) -> Result<bool, Self::Error>,
[src]
P: FnMut(&Self::Item) -> Result<bool, Self::Error>,
fn skip(self, n: usize) -> Skip<Self>
[src]
fn take(self, n: usize) -> Take<Self>
[src]
fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where
F: FnMut(&mut St, Self::Item) -> Result<Option<B>, Self::Error>,
[src]
F: FnMut(&mut St, Self::Item) -> Result<Option<B>, Self::Error>,
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where
F: FnMut(Self::Item) -> Result<U, Self::Error>,
U: IntoFallibleIterator<Error = Self::Error>,
[src]
F: FnMut(Self::Item) -> Result<U, Self::Error>,
U: IntoFallibleIterator<Error = Self::Error>,
fn flatten(self) -> Flatten<Self> where
Self::Item: IntoFallibleIterator,
<Self::Item as IntoFallibleIterator>::Error == Self::Error,
[src]
Self::Item: IntoFallibleIterator,
<Self::Item as IntoFallibleIterator>::Error == Self::Error,
fn fuse(self) -> Fuse<Self>
[src]
fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnMut(&Self::Item) -> Result<(), Self::Error>,
[src]
F: FnMut(&Self::Item) -> Result<(), Self::Error>,
fn by_ref(&mut self) -> &mut Self
[src]
fn collect<T>(self) -> Result<T, Self::Error> where
T: FromFallibleIterator<Self::Item>,
[src]
T: FromFallibleIterator<Self::Item>,
fn partition<B, F>(self, f: F) -> Result<(B, B), Self::Error> where
B: Default + Extend<Self::Item>,
F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
[src]
B: Default + Extend<Self::Item>,
F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
fn fold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where
F: FnMut(B, Self::Item) -> Result<B, Self::Error>,
[src]
F: FnMut(B, Self::Item) -> Result<B, Self::Error>,
fn try_fold<B, E, F>(&mut self, init: B, f: F) -> Result<B, E> where
E: From<Self::Error>,
F: FnMut(B, Self::Item) -> Result<B, E>,
[src]
E: From<Self::Error>,
F: FnMut(B, Self::Item) -> Result<B, E>,
fn all<F>(&mut self, f: F) -> Result<bool, Self::Error> where
F: FnMut(Self::Item) -> Result<bool, Self::Error>,
[src]
F: FnMut(Self::Item) -> Result<bool, Self::Error>,
fn any<F>(&mut self, f: F) -> Result<bool, Self::Error> where
F: FnMut(Self::Item) -> Result<bool, Self::Error>,
[src]
F: FnMut(Self::Item) -> Result<bool, Self::Error>,
fn find<F>(&mut self, f: F) -> Result<Option<Self::Item>, Self::Error> where
F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
[src]
F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
fn find_map<B, F>(&mut self, f: F) -> Result<Option<B>, Self::Error> where
F: FnMut(Self::Item) -> Result<Option<B>, Self::Error>,
[src]
F: FnMut(Self::Item) -> Result<Option<B>, Self::Error>,
fn position<F>(&mut self, f: F) -> Result<Option<usize>, Self::Error> where
F: FnMut(Self::Item) -> Result<bool, Self::Error>,
[src]
F: FnMut(Self::Item) -> Result<bool, Self::Error>,
fn max(self) -> Result<Option<Self::Item>, Self::Error> where
Self::Item: Ord,
[src]
Self::Item: Ord,
fn max_by_key<B, F>(self, f: F) -> Result<Option<Self::Item>, Self::Error> where
B: Ord,
F: FnMut(&Self::Item) -> Result<B, Self::Error>,
[src]
B: Ord,
F: FnMut(&Self::Item) -> Result<B, Self::Error>,
fn max_by<F>(self, f: F) -> Result<Option<Self::Item>, Self::Error> where
F: FnMut(&Self::Item, &Self::Item) -> Result<Ordering, Self::Error>,
[src]
F: FnMut(&Self::Item, &Self::Item) -> Result<Ordering, Self::Error>,
fn min(self) -> Result<Option<Self::Item>, Self::Error> where
Self::Item: Ord,
[src]
Self::Item: Ord,
fn min_by_key<B, F>(self, f: F) -> Result<Option<Self::Item>, Self::Error> where
B: Ord,
F: FnMut(&Self::Item) -> Result<B, Self::Error>,
[src]
B: Ord,
F: FnMut(&Self::Item) -> Result<B, Self::Error>,
fn min_by<F>(self, f: F) -> Result<Option<Self::Item>, Self::Error> where
F: FnMut(&Self::Item, &Self::Item) -> Result<Ordering, Self::Error>,
[src]
F: FnMut(&Self::Item, &Self::Item) -> Result<Ordering, Self::Error>,
fn rev(self) -> Rev<Self> where
Self: DoubleEndedFallibleIterator,
[src]
Self: DoubleEndedFallibleIterator,
fn unzip<A, B, FromA, FromB>(self) -> Result<(FromA, FromB), Self::Error> where
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
Self: FallibleIterator<Item = (A, B)>,
[src]
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
Self: FallibleIterator<Item = (A, B)>,
fn cloned<'a, T>(self) -> Cloned<Self> where
Self: FallibleIterator<Item = &'a T>,
T: 'a + Clone,
[src]
Self: FallibleIterator<Item = &'a T>,
T: 'a + Clone,
fn cycle(self) -> Cycle<Self> where
Self: Clone,
[src]
Self: Clone,
fn cmp<I>(self, other: I) -> Result<Ordering, Self::Error> where
I: IntoFallibleIterator<Item = Self::Item, Error = Self::Error>,
Self::Item: Ord,
[src]
I: IntoFallibleIterator<Item = Self::Item, Error = Self::Error>,
Self::Item: Ord,
fn partial_cmp<I>(self, other: I) -> Result<Option<Ordering>, Self::Error> where
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
[src]
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
fn eq<I>(self, other: I) -> Result<bool, Self::Error> where
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialEq<<I as IntoFallibleIterator>::Item>,
[src]
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialEq<<I as IntoFallibleIterator>::Item>,
fn ne<I>(self, other: I) -> Result<bool, Self::Error> where
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialEq<<I as IntoFallibleIterator>::Item>,
[src]
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialEq<<I as IntoFallibleIterator>::Item>,
fn lt<I>(self, other: I) -> Result<bool, Self::Error> where
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
[src]
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
fn le<I>(self, other: I) -> Result<bool, Self::Error> where
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
[src]
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
fn gt<I>(self, other: I) -> Result<bool, Self::Error> where
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
[src]
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
fn ge<I>(self, other: I) -> Result<bool, Self::Error> where
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
[src]
I: IntoFallibleIterator<Error = Self::Error>,
Self::Item: PartialOrd<<I as IntoFallibleIterator>::Item>,
fn iterator(self) -> Iterator<Self>
[src]
fn map_err<B, F>(self, f: F) -> MapErr<Self, F> where
F: FnMut(Self::Error) -> B,
[src]
F: FnMut(Self::Error) -> B,
Auto Trait Implementations
impl<Q> RefUnwindSafe for ResourceIterator<Q> where
Q: RefUnwindSafe,
<Q as ResourceQuery>::Item: RefUnwindSafe,
Q: RefUnwindSafe,
<Q as ResourceQuery>::Item: RefUnwindSafe,
impl<Q> Send for ResourceIterator<Q> where
Q: Send,
<Q as ResourceQuery>::Item: Send,
Q: Send,
<Q as ResourceQuery>::Item: Send,
impl<Q> Sync for ResourceIterator<Q> where
Q: Sync,
<Q as ResourceQuery>::Item: Sync,
Q: Sync,
<Q as ResourceQuery>::Item: Sync,
impl<Q> Unpin for ResourceIterator<Q> where
Q: Unpin,
<Q as ResourceQuery>::Item: Unpin,
Q: Unpin,
<Q as ResourceQuery>::Item: Unpin,
impl<Q> UnwindSafe for ResourceIterator<Q> where
Q: UnwindSafe,
<Q as ResourceQuery>::Item: RefUnwindSafe + UnwindSafe,
Q: UnwindSafe,
<Q as ResourceQuery>::Item: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoFallibleIterator for I where
I: FallibleIterator,
[src]
I: FallibleIterator,
type Item = <I as FallibleIterator>::Item
The elements of the iterator.
type Error = <I as FallibleIterator>::Error
The error value of the iterator.
type IntoFallibleIter = I
The iterator.
fn into_fallible_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,