pub struct PostgresManagerBuilder { /* private fields */ }Expand description
Builder for PostgresManager
§Example
use lmrc_postgres::{PostgresConfig, PostgresManager};
let config = PostgresConfig::builder()
.version("15")
.database_name("myapp")
.username("myuser")
.password("secure_password")
.build()?;
let manager = PostgresManager::builder()
.config(config)
.server_ip("192.168.1.100")
.ssh_user("root")
.ssh_port(22)
.private_ip("10.0.1.100")
.build()?;Implementations§
Source§impl PostgresManagerBuilder
impl PostgresManagerBuilder
Sourcepub fn config(self, config: PostgresConfig) -> Self
pub fn config(self, config: PostgresConfig) -> Self
Set PostgreSQL configuration
Sourcepub fn ssh_password(self, password: impl Into<String>) -> Self
pub fn ssh_password(self, password: impl Into<String>) -> Self
Set SSH password for password authentication
Sourcepub fn ssh_key_path(self, path: impl Into<String>) -> Self
pub fn ssh_key_path(self, path: impl Into<String>) -> Self
Set SSH private key path for key-based authentication
Sourcepub fn private_ip(self, ip: impl Into<String>) -> Self
pub fn private_ip(self, ip: impl Into<String>) -> Self
Set private IP address (for connection string display)
Sourcepub fn build(self) -> Result<PostgresManager>
pub fn build(self) -> Result<PostgresManager>
Build the PostgresManager
Trait Implementations§
Source§impl Debug for PostgresManagerBuilder
impl Debug for PostgresManagerBuilder
Source§impl Default for PostgresManagerBuilder
impl Default for PostgresManagerBuilder
Source§fn default() -> PostgresManagerBuilder
fn default() -> PostgresManagerBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PostgresManagerBuilder
impl RefUnwindSafe for PostgresManagerBuilder
impl Send for PostgresManagerBuilder
impl Sync for PostgresManagerBuilder
impl Unpin for PostgresManagerBuilder
impl UnwindSafe for PostgresManagerBuilder
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