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§
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.
- IFlat
Map - An iterator that flatten maped each dynamic borrowing iterators.
- IMap
- An iterator that maps dyanmic borrowing iterator items.
- Into
RefIter - Adapter that turns
IteratorintoRefIterator. - Into
RefMut Iter - Adapter that turns
IteratorintoRefMutIterator. - KvIMap
- An iterator that maps dyanmic borrowing key-value iterator items.
- RefIter
- Iterator from
Ref. - RefMut
Iter - Iterator from
RefMut.
Traits§
- Exact
Size RefIterator - Dynamic borrowing iterator that knows its exact length.
- Into
RefIterator - Conversion into an
RefIterator. - Into
RefKv Iterator - Conversion into an
RefKvIterator. - Into
RefMut Iterator - Conversion into an
RefMutIterator. - Into
RefMut KvIterator - Conversion into an
RefMutKvIterator. - RefIterator
- Immutable dynamic borrowing iterator.
- RefIterator
Base - Dynamic borrowing iterator base.
- RefKv
Iterator - Immutable dynamic borrowing key-value iterator.
- RefMut
Iterator - Mutable dynamic borrowing iterator.
- RefMut
KvIterator - Mutable dynamic borrowing key-value iterator.