Struct gimli::read::AttrsIter [−][src]
pub struct AttrsIter<'abbrev, 'entry, 'unit, R: Reader> { /* fields omitted */ }
An iterator over a particular entry’s attributes.
See the documentation for
DebuggingInformationEntry::attrs()
for details.
Can be used with
FallibleIterator
.
Implementations
impl<'abbrev, 'entry, 'unit, R: Reader> AttrsIter<'abbrev, 'entry, 'unit, R>
[src][−]
pub fn next(&mut self) -> Result<Option<Attribute<R>>>
[src][−]
Advance the iterator and return the next attribute.
Returns None
when iteration is finished. If an error
occurs while parsing the next attribute, then this error
is returned, and all subsequent calls return None
.
Trait Implementations
impl<'abbrev, 'entry, 'unit, R: Clone + Reader> Clone for AttrsIter<'abbrev, 'entry, 'unit, R>
[src][+]
fn clone(&self) -> AttrsIter<'abbrev, 'entry, 'unit, R>
[src][−]
Returns a copy of the value. Read more
pub fn clone_from(&mut self, source: &Self)
1.0.0[src][−]
Performs copy-assignment from source
. Read more
impl<'abbrev, 'entry, 'unit, R: Copy + Reader> Copy for AttrsIter<'abbrev, 'entry, 'unit, R>
[src]
impl<'abbrev, 'entry, 'unit, R: Debug + Reader> Debug for AttrsIter<'abbrev, 'entry, 'unit, R>
[src][+]
fn fmt(&self, f: &mut Formatter<'_>) -> Result
[src][−]
Formats the value using the given formatter. Read more
impl<'abbrev, 'entry, 'unit, R: Reader> FallibleIterator for AttrsIter<'abbrev, 'entry, 'unit, R>
[src][+]
type Item = Attribute<R>
The type being iterated over.
type Error = Error
The error type.
fn next(&mut self) -> Result<Option<Self::Item>, Self::Error>
[src][−]
Advances the iterator and returns the next value. Read more
pub fn size_hint(&self) -> (usize, Option<usize>)
[src][−]
Returns bounds on the remaining length of the iterator. Read more
pub fn count(self) -> Result<usize, Self::Error>
[src][−]
Consumes the iterator, returning the number of remaining items.
pub fn last(self) -> Result<Option<Self::Item>, Self::Error>
[src][−]
Returns the last element of the iterator.
pub fn nth(&mut self, n: usize) -> Result<Option<Self::Item>, Self::Error>
[src][−]
Returns the n
th element of the iterator.
pub fn step_by(self, step: usize) -> StepBy<Self>
[src][−]
Returns an iterator starting at the same point, but stepping by the given amount at each iteration. Read more
pub 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>,
Returns an iterator which yields the elements of this iterator followed by another. Read more
pub 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>,
Returns an iterator that yields pairs of this iterator’s and another iterator’s values. Read more
pub 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>,
Returns an iterator which applies a fallible transform to the elements of the underlying iterator. Read more
pub 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>,
Calls a fallible closure on each element of an iterator.
pub 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>,
Returns an iterator which uses a predicate to determine which values should be yielded. The predicate may fail; such failures are passed to the caller. Read more
pub 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>,
Returns an iterator which both filters and maps. The closure may fail; such failures are passed along to the consumer. Read more
pub fn enumerate(self) -> Enumerate<Self>
[src][−]
Returns an iterator which yields the current iteration count as well as the value. Read more
pub fn peekable(self) -> Peekable<Self>
[src][−]
Returns an iterator that can peek at the next element without consuming it. Read more
pub 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>,
Returns an iterator that skips elements based on a predicate.
pub 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>,
Returns an iterator that yields elements based on a predicate.
pub fn skip(self, n: usize) -> Skip<Self>
[src][−]
Returns an iterator which skips the first n
values of this iterator.
pub fn take(self, n: usize) -> Take<Self>
[src][−]
Returns an iterator that yields only the first n
values of this
iterator. Read more
pub 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>,
Returns an iterator which applies a stateful map to values of this iterator. Read more
pub 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>,
Returns an iterator which maps this iterator’s elements to iterators, yielding those iterators’ values.
pub 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,
Returns an iterator which flattens an iterator of iterators, yielding those iterators’ values.
pub fn fuse(self) -> Fuse<Self>
[src][−]
Returns an iterator which yields this iterator’s elements and ends after
the first Ok(None)
. Read more
pub 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>,
Returns an iterator which passes each element to a closure before returning it.
pub fn by_ref(&mut self) -> &mut Self
[src][−]
Borrow an iterator rather than consuming it. Read more
pub fn collect<T>(self) -> Result<T, Self::Error> where
T: FromFallibleIterator<Self::Item>,
[src][−]
T: FromFallibleIterator<Self::Item>,
Transforms the iterator into a collection. Read more
pub fn partition<B, F>(self, f: F) -> Result<(B, B), Self::Error> where
F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
B: Default + Extend<Self::Item>,
[src][−]
F: FnMut(&Self::Item) -> Result<bool, Self::Error>,
B: Default + Extend<Self::Item>,
Transforms the iterator into two collections, partitioning elements by a closure.
pub 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>,
Applies a function over the elements of the iterator, producing a single final value. Read more
pub fn try_fold<B, E, F>(&mut self, init: B, f: F) -> Result<B, E> where
F: FnMut(B, Self::Item) -> Result<B, E>,
E: From<Self::Error>,
[src][−]
F: FnMut(B, Self::Item) -> Result<B, E>,
E: From<Self::Error>,
Applies a function over the elements of the iterator, producing a single final value. Read more
pub 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>,
Determines if all elements of this iterator match a predicate.
pub 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>,
Determines if any element of this iterator matches a predicate.
pub 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>,
Returns the first element of the iterator that matches a predicate.
pub 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>,
Applies a function to the elements of the iterator, returning the first non-None
result.
pub 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>,
Returns the position of the first element of this iterator that matches a predicate. The predicate may fail; such failures are returned to the caller. Read more
pub fn max(self) -> Result<Option<Self::Item>, Self::Error> where
Self::Item: Ord,
[src][−]
Self::Item: Ord,
Returns the maximal element of the iterator.
pub fn max_by_key<B, F>(self, f: F) -> Result<Option<Self::Item>, Self::Error> where
F: FnMut(&Self::Item) -> Result<B, Self::Error>,
B: Ord,
[src][−]
F: FnMut(&Self::Item) -> Result<B, Self::Error>,
B: Ord,
Returns the element of the iterator which gives the maximum value from the function. Read more
pub 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>,
Returns the element that gives the maximum value with respect to the function.
pub fn min(self) -> Result<Option<Self::Item>, Self::Error> where
Self::Item: Ord,
[src][−]
Self::Item: Ord,
Returns the minimal element of the iterator.
pub fn min_by_key<B, F>(self, f: F) -> Result<Option<Self::Item>, Self::Error> where
F: FnMut(&Self::Item) -> Result<B, Self::Error>,
B: Ord,
[src][−]
F: FnMut(&Self::Item) -> Result<B, Self::Error>,
B: Ord,
Returns the element of the iterator which gives the minimum value from the function. Read more
pub 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>,
Returns the element that gives the minimum value with respect to the function.
pub fn rev(self) -> Rev<Self> where
Self: DoubleEndedFallibleIterator,
[src][−]
Self: DoubleEndedFallibleIterator,
Returns an iterator that yields this iterator’s items in the opposite order. Read more
pub fn unzip<A, B, FromA, FromB>(self) -> Result<(FromA, FromB), Self::Error> where
Self: FallibleIterator<Item = (A, B)>,
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
[src][−]
Self: FallibleIterator<Item = (A, B)>,
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
Converts an iterator of pairs into a pair of containers.
pub 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,
Returns an iterator which clones all of its elements.
pub fn cycle(self) -> Cycle<Self> where
Self: Clone,
[src][−]
Self: Clone,
Returns an iterator which repeas this iterator endlessly.
pub 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,
Lexicographically compares the elements of this iterator to that of another. Read more
pub 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>,
Lexicographically compares the elements of this iterator to that of another. Read more
pub 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>,
Determines if the elements of this iterator are equal to those of another. Read more
pub 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>,
Determines if the elements of this iterator are not equal to those of another. Read more
pub 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>,
Determines if the elements of this iterator are lexicographically less than those of another. Read more
pub 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>,
Determines if the elements of this iterator are lexicographically less than or equal to those of another. Read more
pub 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>,
Determines if the elements of this iterator are lexicographically greater than those of another. Read more
pub 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>,
Determines if the elements of this iterator are lexicographically greater than or equal to those of another. Read more
pub fn iterator(self) -> Iterator<Self>
[src][−]
Returns a normal (non-fallible) iterator over Result<Item, Error>
.
pub fn map_err<B, F>(self, f: F) -> MapErr<Self, F> where
F: FnMut(Self::Error) -> B,
[src][−]
F: FnMut(Self::Error) -> B,
Returns an iterator which applies a transform to the errors of the underlying iterator. Read more
Auto Trait Implementations
impl<'abbrev, 'entry, 'unit, R> !RefUnwindSafe for AttrsIter<'abbrev, 'entry, 'unit, R>
impl<'abbrev, 'entry, 'unit, R> !Send for AttrsIter<'abbrev, 'entry, 'unit, R>
impl<'abbrev, 'entry, 'unit, R> !Sync for AttrsIter<'abbrev, 'entry, 'unit, R>
impl<'abbrev, 'entry, 'unit, R> Unpin for AttrsIter<'abbrev, 'entry, 'unit, R> where
R: Unpin,
'abbrev: 'entry,
'unit: 'entry,
R: Unpin,
'abbrev: 'entry,
'unit: 'entry,
impl<'abbrev, 'entry, 'unit, R> !UnwindSafe for AttrsIter<'abbrev, 'entry, 'unit, R>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
pub fn type_id(&self) -> TypeId
[src][−]
Gets the TypeId
of self
. Read more
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
pub fn borrow(&self) -> &T
[src][−]
Immutably borrows from an owned value. Read more
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src][−]
Mutably borrows from an owned value. Read more
impl<T> From<T> for T
[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.
pub fn into_fallible_iter(self) -> I
[src][−]
Creates a fallible iterator from a value.
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src][−]
Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src][−]
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
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.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src][−]
Performs the conversion.
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,