Struct rustorm::config::DbConfig [] [src]

pub struct DbConfig {
    pub platform: String,
    pub username: Option<String>,
    pub password: Option<String>,
    pub host: Option<Host>,
    pub port: Option<u16>,
    pub database: String,
    pub ssl: bool,
}

Fields

platform

postgres, sqlite, mysql some fields are optional since sqlite is not applicable for those

username
password
host

localhost

port

5432

database
ssl

Methods

impl DbConfig

fn from_url(url: &str) -> Option<Self>

TODO: get rid of the hacky way parsing database url https://github.com/servo/rust-url/issues/40

fn get_url(&self) -> String

Trait Implementations

Derived Implementations

impl Debug for DbConfig

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl PartialEq for DbConfig

fn eq(&self, __arg_0: &DbConfig) -> bool

fn ne(&self, __arg_0: &DbConfig) -> bool

impl Clone for DbConfig

fn clone(&self) -> DbConfig

fn clone_from(&mut self, source: &Self)