[][src]Struct openstack::common::ResourceIterator

pub struct ResourceIterator<Q: ResourceQuery> { /* fields omitted */ }

Generic implementation of a FallibleIterator over resources.

Implementations

impl<Q> ResourceIterator<Q> where
    Q: ResourceQuery
[src]

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]

impl<Q: Debug + ResourceQuery> Debug for ResourceIterator<Q> where
    Q::Item: Debug
[src]

impl<Q> FallibleIterator for ResourceIterator<Q> where
    Q: ResourceQuery
[src]

type Item = Q::Item

The type being iterated over.

type Error = Error

The error type.

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: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoFallibleIterator for I where
    I: FallibleIterator
[src]

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.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.