pub struct SslConfig {
pub require_ssl: bool,
pub ca_cert_path: Option<String>,
pub client_cert_path: Option<String>,
pub client_key_path: Option<String>,
pub verify_server_cert: bool,
pub ssl_mode: Option<String>,
}Expand description
SSL/TLS configuration for database connections
Fields§
§require_ssl: boolWhether to require SSL/TLS
ca_cert_path: Option<String>Path to CA certificate file
client_cert_path: Option<String>Path to client certificate file
client_key_path: Option<String>Path to client private key file
verify_server_cert: boolWhether to verify the server certificate
ssl_mode: Option<String>SSL mode (for PostgreSQL: disable, allow, prefer, require, verify-ca, verify-full)
Implementations§
Source§impl SslConfig
impl SslConfig
Sourcepub fn production() -> Self
pub fn production() -> Self
Create SSL config for production environments (strict security)
Sourcepub fn development() -> Self
pub fn development() -> Self
Create SSL config for development environments (relaxed security)
Sourcepub fn validate(&self) -> Result<(), DataProfilerError>
pub fn validate(&self) -> Result<(), DataProfilerError>
Validate SSL configuration
Sourcepub fn apply_to_connection_string(
&self,
connection_string: String,
database_type: &str,
) -> String
pub fn apply_to_connection_string( &self, connection_string: String, database_type: &str, ) -> String
Apply SSL configuration to connection string
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SslConfig
impl<'de> Deserialize<'de> for SslConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SslConfig
impl RefUnwindSafe for SslConfig
impl Send for SslConfig
impl Sync for SslConfig
impl Unpin for SslConfig
impl UnsafeUnpin for SslConfig
impl UnwindSafe for SslConfig
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