pub fn create_with(&self, init: impl FnOnce(&mut T)) -> Option<usize> {
        test_println!("pool: create_with");
        let mut guard = self.create()?;
        init(&mut guard);
        Some(guard.key())
    }
/// Creates a new object in the pool with the provided initializer,
/// returning a key that may be used to access the new object.
///
/// If this function returns `None`, then the shard for the current thread is full and no items
/// can be added until some are removed, or the maximum number of shards has been reached.
///
/// # Examples
/// ```rust
/// # use sharded_slab::Pool;
/// # use std::thread;
/// let pool: Pool<String> = Pool::new();
///
/// // Create a new pooled item, returning its integer key.
/// let key = pool.create_with(|s| s.push_str("Hello")).unwrap();
///
/// /// Other threads may now (immutably) access the item using the key.
/// thread::spawn(move || {
///    assert_eq!(pool.get(key).unwrap(), String::from("Hello"));
/// }).join().unwrap();
/// ```
Creates a new object in the pool with the provided initializer,
returning a key that may be used to access the new object.

If this function returns `None`, then the shard for the current thread is full and no items
can be added until some are removed, or the maximum number of shards has been reached.
Creates a new object in the pool with the provided initializer returning a key that may be used to access the new object . If this function returns ` None ` then the shard for the current thread is full and no items can be added until some are removed or the maximum number of shards has been reached .
pub fn create_with(&self, init: impl FnOnce(&mut T)) -> Option<usize> {
        test_println!("pool: create_with");
        let mut guard = self.create()?;
        init(&mut guard);
        Some(guard.key())
    }
pub fn create_with ( & self , init : impl FnOnce ( & mut T ) ) -> Option < usize > { test_println ! ( " " ) ; let mut guard = self . create ( ) ? ; init ( & mut guard ) ; Some ( guard . key ( ) ) }
Creates a new object in the pool with the provided initializer,
returning a key that may be used to access the new object.
Creates a new object in the pool with the provided initializer returning a key that may be used to access the new object .
&self
init
impl FnOnce(&mut T)
&self
init
impl FnOnce(&mut T)
examples
None
use sharded_slab::pool;
None
use std::thread;
let pool: Pool = Pool::new().

Create a new pooled item, returning its integer key.
let key = pool.create_with(|s| s.push_str("Hello")).unwrap().

Other threads may now (immutably) access the item using the key.
let pool : Pool = Pool :: new () . Create a new pooled item returning its integer key . let key = pool . create_with ( |s| s . push_str ( " Hello " )) . unwrap () . Other threads may now ( immutably ) access the item using the key .