Skip to main content

Iterable

Trait Iterable 

Source
pub trait Iterable: _Object {
    // Required method
    fn __len__(&self) -> usize;
}
Expand description

implement iterable for List for example i need this to use with max min builtins

Required Methods§

Source

fn __len__(&self) -> usize

return the length of the collection/container/iterable

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl Iterable for List

if you want to use max(&list) you need the impl for &List how comes that for Object work by default