pub struct RemoteDatabaseConfig {
pub connection_string: String,
pub pool_size: Option<u32>,
pub timeout_seconds: Option<u32>,
}Expand description
Configuration for a remote database connection
Fields§
§connection_string: StringConnection string (e.g., “postgresql://user:pass@host:5432/dbname”)
pool_size: Option<u32>Optional pool size (default: 5)
timeout_seconds: Option<u32>Optional connection timeout in seconds (default: 5)
Implementations§
Source§impl RemoteDatabaseConfig
impl RemoteDatabaseConfig
Sourcepub fn new(connection_string: impl Into<String>) -> Self
pub fn new(connection_string: impl Into<String>) -> Self
Create a new remote database configuration
Sourcepub fn with_pool_size(self, size: u32) -> Self
pub fn with_pool_size(self, size: u32) -> Self
Set the connection pool size
Sourcepub fn with_timeout(self, seconds: u32) -> Self
pub fn with_timeout(self, seconds: u32) -> Self
Set the connection timeout
Sourcepub fn get_pool_size(&self) -> u32
pub fn get_pool_size(&self) -> u32
Get pool size (default 5)
Sourcepub fn get_timeout_seconds(&self) -> u32
pub fn get_timeout_seconds(&self) -> u32
Get timeout in seconds (default 5)
Trait Implementations§
Source§impl Clone for RemoteDatabaseConfig
impl Clone for RemoteDatabaseConfig
Source§fn clone(&self) -> RemoteDatabaseConfig
fn clone(&self) -> RemoteDatabaseConfig
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for RemoteDatabaseConfig
impl RefUnwindSafe for RemoteDatabaseConfig
impl Send for RemoteDatabaseConfig
impl Sync for RemoteDatabaseConfig
impl Unpin for RemoteDatabaseConfig
impl UnsafeUnpin for RemoteDatabaseConfig
impl UnwindSafe for RemoteDatabaseConfig
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