pub struct BrainPoolConfig {
pub brain_addr: SocketAddr,
pub pool_size: usize,
pub max_credentials: usize,
pub idle_ttl: Duration,
}Expand description
Configuration for a BrainPool.
Fields§
§brain_addr: SocketAddrThe Brain database listener address every pool connects to.
pool_size: usizeSockets per credential (the brain_db_sdk::Pool width).
max_credentials: usizeHard cap on distinct cached credentials; the least-recently-used entry is evicted on insert once the cache is full.
idle_ttl: DurationCredentials unused longer than this are dropped by BrainPool::sweep_idle.
Trait Implementations§
Source§impl Clone for BrainPoolConfig
impl Clone for BrainPoolConfig
Auto Trait Implementations§
impl Freeze for BrainPoolConfig
impl RefUnwindSafe for BrainPoolConfig
impl Send for BrainPoolConfig
impl Sync for BrainPoolConfig
impl Unpin for BrainPoolConfig
impl UnsafeUnpin for BrainPoolConfig
impl UnwindSafe for BrainPoolConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more