Struct i18n_config::I18nConfig [−][src]
pub struct I18nConfig { pub fallback_language: LanguageIdentifier, pub subcrates: Vec<PathBuf>, pub gettext: Option<GettextConfig>, pub fluent: Option<FluentConfig>, }
The data structure representing what is stored (and possible to
store) within a i18n.toml
file.
Fields
fallback_language: LanguageIdentifier
The locale identifier of the language used in the source code
for gettext
system, and the primary fallback language (for
which all strings must be present) when using the fluent
system.
subcrates: Vec<PathBuf>
Specify which subcrates to perform localization within. The
subcrate needs to have its own i18n.toml
.
gettext: Option<GettextConfig>
The subcomponent of this config relating to gettext, only present if the gettext localization system will be used.
fluent: Option<FluentConfig>
The subcomponent of this config relating to gettext, only present if the fluent localization system will be used.
Implementations
impl I18nConfig
[src]
impl I18nConfig
[src]pub fn from_file<P: AsRef<Path>>(
toml_path: P
) -> Result<I18nConfig, I18nConfigError>
[src]
toml_path: P
) -> Result<I18nConfig, I18nConfigError>
Load the config from the specified toml file path.
Trait Implementations
impl Clone for I18nConfig
[src]
impl Clone for I18nConfig
[src]fn clone(&self) -> I18nConfig
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'de> Deserialize<'de> for I18nConfig
[src]
impl<'de> Deserialize<'de> for I18nConfig
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for I18nConfig
impl RefUnwindSafe for I18nConfig
impl Send for I18nConfig
impl Send for I18nConfig
impl Sync for I18nConfig
impl Sync for I18nConfig
impl Unpin for I18nConfig
impl Unpin for I18nConfig
impl UnwindSafe for I18nConfig
impl UnwindSafe for I18nConfig
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]