pub struct Config {
pub postgres: Option<PostgresParams>,
pub sqlite: Option<SqliteParams>,
pub database_url: Option<String>,
}
Fields§
§postgres: Option<PostgresParams>
§sqlite: Option<SqliteParams>
§database_url: Option<String>
Implementations§
source§impl Config
impl Config
pub fn load(file: &str) -> Result<Self>
pub fn into_pg_conn_from_url(self) -> Result<Client>
pub fn into_pg_conn_from_config(self) -> Result<Client>
pub fn into_sqlite_conn(self) -> Result<Connection>
pub fn into_db_adaptor(self) -> Result<Box<dyn DbAdaptor>>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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