[][src]Struct actix_settings::BasicSettings

pub struct BasicSettings<A> {
    pub actix: ActixSettings,
    pub application: A,
}

Fields

actix: ActixSettingsapplication: A

Implementations

impl<A> BasicSettings<A> where
    A: for<'de> Deserialize<'de>, 
[src]

pub fn parse_toml<P>(filepath: P) -> AtResult<Self> where
    P: AsRef<Path>, 
[src]

Parse an instance of Self from a TOML file located at filepath. If the file doesn't exist, it is generated from the default TOML template, after which the newly generated file is read in and parsed.

pub fn from_default_template() -> AtResult<Self>[src]

Parse an instance of Self straight from the default TOML template.

pub fn from_template(template: &str) -> AtResult<Self>[src]

Parse an instance of Self straight from the default TOML template.

pub fn write_toml_file<P>(filepath: P) -> AtResult<()> where
    P: AsRef<Path>, 
[src]

Write the default TOML template to a new file, to be located at filepath. Return a Error::FileExists(_) error if a file already exists at that location.

pub fn override_field<F, V>(field: &mut F, value: V) -> AtResult<()> where
    F: Parse,
    V: AsRef<str>, 
[src]

pub fn override_field_with_env_var<F, N>(
    field: &mut F,
    var_name: N
) -> AtResult<()> where
    F: Parse,
    N: AsRef<str>, 
[src]

Trait Implementations

impl<A: Clone> Clone for BasicSettings<A>[src]

impl<A: Debug> Debug for BasicSettings<A>[src]

impl<'de, A> Deserialize<'de> for BasicSettings<A> where
    A: Deserialize<'de>, 
[src]

impl<A: Eq> Eq for BasicSettings<A>[src]

impl<A: Hash> Hash for BasicSettings<A>[src]

impl<A: PartialEq> PartialEq<BasicSettings<A>> for BasicSettings<A>[src]

impl<A> StructuralEq for BasicSettings<A>[src]

impl<A> StructuralPartialEq for BasicSettings<A>[src]

Auto Trait Implementations

impl<A> RefUnwindSafe for BasicSettings<A> where
    A: RefUnwindSafe

impl<A> Send for BasicSettings<A> where
    A: Send

impl<A> Sync for BasicSettings<A> where
    A: Sync

impl<A> Unpin for BasicSettings<A> where
    A: Unpin

impl<A> UnwindSafe for BasicSettings<A> where
    A: UnwindSafe

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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