rufft::traits

Trait Iterable

Source
pub trait Iterable: FromIterator<Self::OwnedItem>
where for<'c> Self::Item<'c>: Deref<Target = Self::OwnedItem>, for<'c> Self: 'c + Clone,
{ type OwnedItem; type Item<'collection> where Self: 'collection; type Iterator<'collection>: ExactSizeIterator<Item = Self::Item<'collection>> + DoubleEndedIterator<Item = Self::Item<'collection>> where Self: 'collection; // Required method fn iter<'c>(&'c self) -> Self::Iterator<'c>; // Provided method fn len(&self) -> usize { ... } }
Expand description

Iterable trait to encapsulate collection types which have a length, are reversible, and are iterable

Required Associated Types§

Source

type OwnedItem

The owned collection item. For example f64 for Vec<f64>

Source

type Item<'collection> where Self: 'collection

The item produced by the collection’s iterator. For example &f64 for Vec<f64

Source

type Iterator<'collection>: ExactSizeIterator<Item = Self::Item<'collection>> + DoubleEndedIterator<Item = Self::Item<'collection>> where Self: 'collection

The iterator produced by the collection

Required Methods§

Source

fn iter<'c>(&'c self) -> Self::Iterator<'c>

Create an iterator from the collection over Self::Item types

Provided Methods§

Source

fn len(&self) -> usize

Return the length of the collection. Default implementation provided based on the fact that an ExactSizeIterator implementation is required but may be more performant to override the implementation

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> Iterable for Vec<T>
where for<'c> T: 'c + Clone,

Source§

type Item<'c> = &'c T where T: 'c

Source§

type OwnedItem = T

Source§

type Iterator<'c> = Iter<'c, T> where T: 'c

Source§

fn iter<'c>(&'c self) -> Self::Iterator<'c>

Source§

fn len(&self) -> usize

Source§

impl<T> Iterable for Array1<T>
where for<'c> T: 'c + Clone,

Source§

type Item<'c> = &'c T where T: 'c

Source§

type OwnedItem = T

Source§

type Iterator<'c> = Iter<'c, T, Dim<[usize; 1]>> where T: 'c

Source§

fn iter<'c>(&'c self) -> Self::Iterator<'c>

Source§

fn len(&self) -> usize

Implementors§