[][src]Trait tlid::Behavior

pub trait Behavior: Sized {
    type Id: IdAble;
    type Return;
    fn next(pool: &mut Pool<Self>) -> Self::Return;
}

Associated Types

type Id: IdAble

type Return

Loading content...

Required methods

fn next(pool: &mut Pool<Self>) -> Self::Return

Loading content...

Implementors

impl<Id: IdAble> Behavior for Checked<Id>[src]

type Id = Id

type Return = Result<Id, CheckedError>

fn next(pool: &mut Pool<Self>) -> Self::Return[src]

checked ::next() method, id is always unique

impl<Id: IdAble> Behavior for UnChecked<Id>[src]

type Id = Id

type Return = Id

fn next(pool: &mut Pool<Self>) -> Self::Return[src]

unchecked ::next() method, no checks and gurantees given

impl<Id: IdAble> Behavior for Wrapping<Id>[src]

type Id = Id

type Return = Id

fn next(pool: &mut Pool<Self>) -> Self::Return[src]

wrapping ::next() method, when out of range, wrapover to first element WARNING: due to optimizations this does not behave correctly on Pools which are created with an empty range

Loading content...