Struct stry_common::config::Config[][src]

pub struct Config {
    pub ip: [u8; 4],
    pub port: u16,
    pub database: String,
}

The application init configuration.

Fields

ip: [u8; 4]

Defines what ip the web server will be bound to.

Default

If constructed with Default::default this value is set to [0, 0, 0, 0] (aka 0.0.0.0).

port: u16

Defines what port the web server will listen to.

Default

If constructed with Default::default this value is set to 8901.

database: String

The database connection URI.

Uses following format:

scheme://[username:password@]host[:port1][,...hostN[:portN]][/[database][?options]]

Default

If constructed with Default::default this value is set to postgres://stry:stry@localhost:5432/stry.

Examples

Connecting to PostgreSQL:

postgres://stry:stry@localhost:5432/stry

Connecting with SQLite:

sqlite://stry.db

Warning

The parser for this is very simple and may not be able to understand every valid URI.

Trait Implementations

impl Clone for Config[src]

impl Debug for Config[src]

impl Default for Config[src]

impl<'de> Deserialize<'de> for Config where
    Config: Default
[src]

impl Initialize for Config[src]

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

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> 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,