[][src]Trait fpool::Pool

pub trait Pool {
    type Item;
    type ConstructionError;
    fn get(
        &mut self
    ) -> Result<&mut ItemHandle<Self::Item>, Self::ConstructionError>; }

An object which returns re-used items. Pools hold on to a constructor so they can recreate elements that are invalid (marked by user).

Associated Types

Loading content...

Required methods

fn get(
    &mut self
) -> Result<&mut ItemHandle<Self::Item>, Self::ConstructionError>

Items are re-used unless invalid, in which case they are re-constructed. If the construction fails, then the error is returned. Do not hold on to the ItemHandle reference, as it may be returned by a subsequent call on get().

Loading content...

Implementors

impl<T, TCError> Pool for RoundRobinPool<T, TCError>[src]

type Item = T

type ConstructionError = TCError

Loading content...