pub struct Config {
pub conn_limit: usize,
pub source: Source,
}Expand description
Node configuration related to the database.
Fields§
§conn_limit: usizeThe number of simultaneous connections to the database to maintain.
source: SourceHow to source the node’s database.
Implementations§
Source§impl Config
impl Config
Sourcepub fn new(source: Source, conn_limit: usize) -> Self
pub fn new(source: Source, conn_limit: usize) -> Self
Config with specified source and connection limit.
Sourcepub fn default_conn_limit() -> usize
pub fn default_conn_limit() -> usize
The default connection limit.
This default uses the number of available CPUs as a heuristic for a default connection limit. Specifically, it multiplies the number of available CPUs by 4.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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