TypeIter

Struct TypeIter 

Source
pub struct TypeIter<'t> { /* private fields */ }
Expand description

A TypeIter iterates over a TypeInformation, producing Typess.

Type streams are represented internally as a series of records, each of which have a length, a type, and a type-specific field layout. Iteration performance is therefore similar to a linked list.

Trait Implementations§

Source§

impl<'t> Debug for TypeIter<'t>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'t> FallibleIterator for TypeIter<'t>

Source§

type Item = Type<'t>

The type being iterated over.
Source§

type Error = Error

The error type.
Source§

fn next(&mut self) -> Result<Option<Self::Item>, Self::Error>

Advances the iterator and returns the next value. Read more
Source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns bounds on the remaining length of the iterator. Read more
Source§

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.
Source§

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.
Source§

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.
Source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Borrow an iterator rather than consuming it. Read more
Source§

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.
Source§

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.
Source§

fn count(self) -> Result<usize, Self::Error>
where Self: Sized,

Consumes the iterator, returning the number of remaining items.
Source§

fn collect<T>(self) -> Result<T, Self::Error>
where T: FromFallibleIterator<Self::Item>, Self: Sized,

Transforms the iterator into a collection. Read more
Source§

fn enumerate(self) -> Enumerate<Self>
where Self: Sized,

Returns an iterator which yields the current iteration count as well as the value.
Source§

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.
Source§

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.
Source§

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.
Source§

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 more
Source§

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.
Source§

fn iterator(self) -> Iterator<Self>
where Self: Sized,

Returns a normal (non-fallible) iterator over Result<Item, Error>.
Source§

fn last(self) -> Result<Option<Self::Item>, Self::Error>
where Self: Sized,

Returns the last element of the iterator.
Source§

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.
Source§

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.
Source§

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.
Source§

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.
Source§

fn nth(&mut self, n: usize) -> Result<Option<Self::Item>, Self::Error>

Returns the nth element of the iterator.
Source§

fn peekable(self) -> Peekable<Self>
where Self: Sized,

Returns an iterator that can peek at the next element without consuming it.
Source§

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.
Source§

fn take(self, n: usize) -> Take<Self>
where Self: Sized,

Returns an iterator that yields only the first n values of this iterator.
Source§

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.
Source§

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.
Source§

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.
Source§

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.
Source§

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.
Source§

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.
Source§

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.
Source§

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.

Auto Trait Implementations§

§

impl<'t> Freeze for TypeIter<'t>

§

impl<'t> RefUnwindSafe for TypeIter<'t>

§

impl<'t> Send for TypeIter<'t>

§

impl<'t> Sync for TypeIter<'t>

§

impl<'t> Unpin for TypeIter<'t>

§

impl<'t> UnwindSafe for TypeIter<'t>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<I> IntoFallibleIterator for I

Source§

type Item = <I as FallibleIterator>::Item

The elements of the iterator.
Source§

type Error = <I as FallibleIterator>::Error

The error value of the iterator.
Source§

type IntoIter = I

The iterator.
Source§

fn into_fallible_iterator(self) -> I

Creates a fallible iterator from a value.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.