Skip to main content

Iterable

Trait Iterable 

Source
pub trait Iterable<Item> {
    // Required method
    fn iter<'i>(&'i self) -> Iter<'i, Item>;
}
Expand description

Trait to mark a struct as iterable over Item.

Required Methods§

Source

fn iter<'i>(&'i self) -> Iter<'i, Item>

Get the iterator.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Item, Collection> Iterable<Item> for Collection
where Collection: AsRef<[Item]>,