pub struct ConfigBuilder { /* private fields */ }Expand description
Builder for constructing a DbkitConfig from individual parameters.
Implementations§
Source§impl ConfigBuilder
impl ConfigBuilder
pub fn host(self, host: &str) -> Self
pub fn port(self, port: u16) -> Self
pub fn database(self, database: &str) -> Self
pub fn user(self, user: &str) -> Self
pub fn password(self, password: &str) -> Self
pub fn pool_size(self, size: usize) -> Self
pub fn connect_timeout_secs(self, secs: u64) -> Self
pub fn idle_timeout_secs(self, secs: u64) -> Self
pub fn auto_create_db(self, enabled: bool) -> Self
pub fn ssl_mode(self, mode: SslMode) -> Self
Sourcepub fn build(self) -> DbkitConfig
pub fn build(self) -> DbkitConfig
Build the config, constructing the connection URL from parts.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigBuilder
impl RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl UnsafeUnpin for ConfigBuilder
impl UnwindSafe for ConfigBuilder
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