[][src]Struct loon::Config

pub struct Config { /* fields omitted */ }

Configuration to build a Dictionary

Methods

impl Config[src]

pub fn with_localized_path<I: Into<String>, J: Into<PathBuf>>(
    self,
    locale: I,
    load_path: J
) -> Self
[src]

Add messages for a specific locale (e.g. en) from a specific file.

pub fn with_path_pattern<I: Into<String>>(self, load_path_pattern: I) -> Self[src]

Use the specified glob pattern to add multiple files.

Locale will be determined by the file_stem: e.g. en.yml for locale = en.

pub fn with_default_locale<I: Into<String>>(self, default_locale: I) -> Self[src]

Set the default locale.

pub fn finish(self) -> Result<Dictionary>[src]

Build the Dictionary item.

Trait Implementations

impl Clone for Config[src]

impl Default for Config[src]

impl<T> From<T> for Config where
    T: ConfigPart, 
[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> 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.