#[repr(transparent)]
pub struct FromIter<I: ?Sized + Iterator>(pub I);
Expand description

Note: since this wrapper only exists to avoid coherence issues, it is guaranteed to be a #[repr(transparent)] wrapper around its inner I.

This is a property unsafe code can rely on: it can thus use transmute to construct it.

It is also a property that will be upheld within future versions (should this property ever be broken in the future, the change would then be a semver-breaking one, and the type would be renamed to avoid footguns).

Tuple Fields

0: I

Trait Implementations

Query the next() Item of this Self iterator. Read more

Convenience method: same as .map(), but for hard-coding the HKT parameter to HKTRef<R> = HKT!(&R). Read more

Convenience method: same as .map(), but for hard-coding the HKT parameter to HKTRefMut<R> = HKT!(&mut R). Read more

Convenience shorthand for .map…(…).into_iter(). Read more

Convenience method: same as .filter_map(), but for hard-coding the HKT parameter to HKTRef<R> = HKT!(&R). Read more

Convenience method: same as .filter_map(), but for hard-coding the HKT parameter to HKTRefMut<R> = HKT!(&mut R). Read more

Convenience shorthand for .filter_map…(…).into_iter(). Read more

Convert a Self : LendingIterator into an Iterator, provided Self::Item<'_> does not depend on '_. Read more

Available on crate feature alloc only.

Converts this LendingIterator into a Box<dyn LendingIteratorDyn…>. Read more

Converts this LendingIterator into a Box<dyn LendingIteratorDyn…>. Read more

The “output” of this whole hand-rolled GAT: think of LendingIteratorඞItem<'lt>::T as of LendingIterator::Item<'lt>. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.