pub trait IntoIdentifierIterator {
    type Item: Identifier;

    // Required method
    fn into_ids_iterator<F>(self, next: F) -> impl Iterator<Item = Self::Item>
       where F: Fn(&Self::Item) -> Self::Item;
}
Expand description

The IntoIdentityIterator trait allows to create a sequence of identifiers starting with a given identifier value and using a given function which computes a new identifier.

§Example

use aabel_identifier_rs::*;

let id = 10_u8;
let mut iter = id.into_ids_iterator(|id| id + 1);
assert_eq!(iter.next(), Some(10));
assert_eq!(iter.next(), Some(11));

Required Associated Types§

Required Methods§

source

fn into_ids_iterator<F>(self, next: F) -> impl Iterator<Item = Self::Item>
where F: Fn(&Self::Item) -> Self::Item,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> IntoIdentifierIterator for T
where T: Copy + Identifier,

§

type Item = T