deadpool/
lib.rs

1#![doc = include_str!("../README.md")]
2#![cfg_attr(docsrs, feature(doc_cfg))]
3#![deny(
4    nonstandard_style,
5    rust_2018_idioms,
6    rustdoc::broken_intra_doc_links,
7    rustdoc::private_intra_doc_links
8)]
9#![forbid(non_ascii_idents, unsafe_code)]
10#![warn(
11    deprecated_in_future,
12    missing_copy_implementations,
13    missing_debug_implementations,
14    missing_docs,
15    unreachable_pub,
16    unused_import_braces,
17    unused_labels,
18    unused_lifetimes,
19    unused_qualifications,
20    unused_results
21)]
22#![allow(clippy::uninlined_format_args)]
23
24#[cfg(feature = "managed")]
25#[cfg_attr(docsrs, doc(cfg(feature = "managed")))]
26pub mod managed;
27
28#[cfg(feature = "unmanaged")]
29#[cfg_attr(docsrs, doc(cfg(feature = "unmanaged")))]
30pub mod unmanaged;
31
32pub use deadpool_runtime::{Runtime, SpawnBlockingError};
33
34/// The current pool status.
35#[derive(Clone, Copy, Debug)]
36pub struct Status {
37    /// The maximum size of the pool.
38    pub max_size: usize,
39
40    /// The current size of the pool.
41    pub size: usize,
42
43    /// The number of available objects in the pool.
44    pub available: usize,
45
46    /// The number of futures waiting for an object.
47    pub waiting: usize,
48}