connection_string_generator/
lib.rs

1//! A VERY simple crate to generate database connection strings programmatically.
2//!
3//! # Currently supported databases
4//! - `PostgreSQL`
5//! - `Microsoft SQL Server`
6
7#[cfg(feature = "postgres")]
8pub mod postgres;
9
10#[cfg(feature = "postgres")]
11pub use postgres::PostgresConnectionString;
12
13#[cfg(feature = "sqlserver")]
14pub mod sqlserver;
15
16#[cfg(feature = "sqlserver")]
17pub use sqlserver::SqlServerConnectionString;
18
19/// Username & password bundled as struct
20#[derive(Debug)]
21pub struct UsernamePassword {
22    username: String,
23    password: String,
24}
25
26/// host & port bundled as struct
27#[derive(Debug)]
28pub struct HostPort {
29    host: String,
30    port: usize,
31}