Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zslayton committed Sep 21, 2015
1 parent 23b6477 commit 85f3d00
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,12 +441,20 @@ impl <T> PoolBuilder<T> where T: Recycleable {
}
}

/// Implementing this trait allows structs to act as configuration
/// parameters in the builder API.
pub trait OptionSetter<T> {
fn set_option(self, T) -> T;
}

/// Specifies a trait object which will be used to generate values when
/// the `Pool` is empty.
pub struct StartingSize(pub usize);
/// Specifies the number of values which should be requested from the
/// Supplier at initialization time.
pub struct MaxSize(pub usize);
/// Specifies the maximum number of values the pool can hold before it
/// will begin to drop values being returned to it.
pub struct Supplier<T> where T: Recycleable {
supplier: Box<Supply<T>>
}
Expand Down

0 comments on commit 85f3d00

Please sign in to comment.