[][src]Struct spirit::fragment::driver::IdGen

pub struct IdGen(_);

Generator of IDs for the Driver.

The Driver needs to identify the resources it created, so it can later on request their removal. The CacheId is used for that. That is an opaque type, so the Driver can either create a default (non-unique) one or use this generator to create unique IDs.

Note that a generator will never produce two equal IDs, but two different generators can both produce the same one. The Driver must take care not to use IDs from two different generators.

The IDs are produced using the Iterator trait.

The generator implements a very small set of traits. In particular, it isn't Clone. This is on purpose, because cloning the generators could lead to surprising behaviours.

Trait Implementations

impl Debug for IdGen[src]

impl Default for IdGen[src]

impl Iterator for IdGen[src]

type Item = CacheId

The type of the elements being iterated over.

Auto Trait Implementations

impl RefUnwindSafe for IdGen

impl Send for IdGen

impl Sync for IdGen

impl Unpin for IdGen

impl UnwindSafe for IdGen

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> IntoResult<T> for T[src]

impl<T> Itertools for T where
    T: Iterator + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.