[][src]Struct df_st_core::config::DatabaseConfig

pub struct DatabaseConfig {
    pub service: Option<String>,
    pub uri: Option<String>,
    pub config: DBURLConfig,
    pub pool_size: Option<i64>,
}

Everything in the configuration under df_storyteller-config.json.database.

Fields

service: Option<String>

Database service name, only "postgres" and "sqlite" are supported. Default is set to "sqlite"

uri: Option<String>

Directly set the URI/URL for a database connection. If uri is set config will be ignored. SQLite example: df_st_database.db (just the filename or path to file) Postgres example: postgres://df_storyteller:password123@localhost:5432/df_storyteller For more info about Postgres connection URI here.

config: DBURLConfig

Config used to create the connection with the database. This config is used to create a URI, so some characters (in password for example) might return errors. If uri is set the object will be ignored.

pool_size: Option<i64>

When connecting to the database it will open multiple connections. Set the size of the pool of connections that will be opened. This is mostly be utilized when the API is running.

Trait Implementations

impl Clone for DatabaseConfig[src]

impl Debug for DatabaseConfig[src]

impl Default for DatabaseConfig[src]

impl<'de> Deserialize<'de> for DatabaseConfig[src]

impl PartialEq<DatabaseConfig> for DatabaseConfig[src]

impl Serialize for DatabaseConfig[src]

impl StructuralPartialEq for DatabaseConfig[src]

Auto Trait Implementations

impl RefUnwindSafe for DatabaseConfig

impl Send for DatabaseConfig

impl Sync for DatabaseConfig

impl Unpin for DatabaseConfig

impl UnwindSafe for DatabaseConfig

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.