pseudo_pool 0.1.1

A pool-like collection that automatically returns objects to the pool & blocks when the pool is empty
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crossbeam_channel::{RecvTimeoutError, SendError};
use thiserror::Error;
use uuid::Uuid;

#[derive(Error, Debug)]
pub enum PseudoPoolError {
    #[error("Invalid checkin of pool entry {0:?}")]
    InvalidCheckin(Uuid),
    #[error(transparent)]
    RecvTimeoutError(#[from] RecvTimeoutError),
    #[error(transparent)]
    SendError(#[from] SendError<()>),
}

pub type Result<T> = std::result::Result<T, PseudoPoolError>;