Struct deadpool_postgres::PoolConfig
source · Expand description
Pool configuration.
Fields§
§max_size: usizeMaximum size of the Pool.
timeouts: TimeoutsTimeouts of the Pool.
Implementations§
source§impl PoolConfig
impl PoolConfig
sourcepub fn new(max_size: usize) -> PoolConfig
pub fn new(max_size: usize) -> PoolConfig
Creates a new PoolConfig without any timeouts and with the provided
max_size.
Trait Implementations§
source§impl Clone for PoolConfig
impl Clone for PoolConfig
source§fn clone(&self) -> PoolConfig
fn clone(&self) -> PoolConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for PoolConfig
impl Debug for PoolConfig
source§impl Default for PoolConfig
impl Default for PoolConfig
source§fn default() -> PoolConfig
fn default() -> PoolConfig
Creates a new PoolConfig with the max_size being set to
cpu_count * 4 ignoring any logical CPUs (Hyper-Threading).
source§impl<'de> Deserialize<'de> for PoolConfig
impl<'de> Deserialize<'de> for PoolConfig
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<PoolConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<PoolConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for PoolConfig
impl Serialize for PoolConfig
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more