Struct fluent_typed::BuildOptions
source · pub struct BuildOptions {
pub locales_folder: String,
pub output_file_path: String,
pub ftl_output: FtlOutputOptions,
pub prefix: String,
pub indentation: String,
pub default_language: String,
}
Fields§
§locales_folder: String
The path to the folder containing the locales.
Defaults to “locales”.
output_file_path: String
The path to the file where the generated code will be written. It is recommended
to use a path inside of src/
and to include the file in the project so that
you get warnings for unused translation messages.
Defaults to “src/l10n.rs”.
ftl_output: FtlOutputOptions
The the ftl output options, which let you configure how the output ftl files are generated and accessed.
prefix: String
The prefix is a simple string that will be added to all generated function names.
Defaults to “msg_”.
indentation: String
The indentation used in the generated file.
Defaults to four spaces.
default_language: String
The default language to use for the L10n enum. An error is thrown during build if the default language is not found in the locales.
It defaults to “en”
Implementations§
source§impl BuildOptions
impl BuildOptions
pub fn with_locales_folder(self, locales_folder: &str) -> Self
pub fn with_output_file_path(self, output_file_path: &str) -> Self
pub fn with_prefix(self, prefix: &str) -> Self
pub fn with_indentation(self, indentation: &str) -> Self
pub fn with_ftl_output(self, opts: FtlOutputOptions) -> Self
pub fn with_default_language(self, lang: &str) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BuildOptions
impl !RefUnwindSafe for BuildOptions
impl !Send for BuildOptions
impl !Sync for BuildOptions
impl Unpin for BuildOptions
impl !UnwindSafe for BuildOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more