[−][src]Struct i18n_config::I18nConfig
The data structure representing what is stored (and possible to
store) within a i18n.toml
file.
Fields
src_locale: String
The locale/language identifier of the language used in the source code.
target_locales: Vec<String>
The locales that the software will be translated into.
subcrates: Option<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.
Methods
impl I18nConfig
[src]
pub fn from_file<P: AsRef<Path>>(toml_path: P) -> Result<I18nConfig>
[src]
Load the config from the specified toml file path.
Trait Implementations
impl Debug 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 Send for I18nConfig
impl Sync for I18nConfig
impl Unpin for I18nConfig
impl UnwindSafe for I18nConfig
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,