Crate ref_iter

Crate ref_iter 

Source
Expand description

Dynamic borrowing iterator.

The author of this crate is not good at English. Forgive me if the document is hard to read.

This crate provides lending iterator for dynamic borrowing objects (Ref and RefMut).

§Examples

let samples = vec![1, 2, 3];
let src = RefCell::new(samples.clone());
let iter = RefIter::new(src.borrow(), |x| x.iter());
assert!(iter.icloned().eq(samples.iter().cloned()));

Re-exports§

pub use ref_iter_macro;

Modules§

closures
Crate’s closures.
macros
Macro and private items for macro.
prelude
Crate’s prelude.

Macros§

for_ref
Immutable for-in loop with dynamic borrowings.
for_ref_kv
Immutable key-value for-in loop with dynamic borrowings.
for_ref_mut
Mutable for-in loop with dynamic borrowings.
for_ref_mut_kv
Mutable key-value for-in loop with dynamic borrowings.

Structs§

ICloned
An iterator that clones elements of dynamic borrowing iterator.
IFlatMap
An iterator that flatten maped each dynamic borrowing iterators.
IMap
An iterator that maps dyanmic borrowing iterator items.
IntoRefIter
Adapter that turns Iterator into RefIterator.
IntoRefMutIter
Adapter that turns Iterator into RefMutIterator.
KvIMap
An iterator that maps dyanmic borrowing key-value iterator items.
RefIter
Iterator from Ref.
RefMutIter
Iterator from RefMut.

Traits§

ExactSizeRefIterator
Dynamic borrowing iterator that knows its exact length.
IntoRefIterator
Conversion into an RefIterator.
IntoRefKvIterator
Conversion into an RefKvIterator.
IntoRefMutIterator
Conversion into an RefMutIterator.
IntoRefMutKvIterator
Conversion into an RefMutKvIterator.
RefIterator
Immutable dynamic borrowing iterator.
RefIteratorBase
Dynamic borrowing iterator base.
RefKvIterator
Immutable dynamic borrowing key-value iterator.
RefMutIterator
Mutable dynamic borrowing iterator.
RefMutKvIterator
Mutable dynamic borrowing key-value iterator.