pub struct StringTemplaterOptions {
pub safe_parse: bool,
pub display_missing_keys: bool,
pub override_missing_keys: Option<Box<dyn Fn(&String) -> String>>,
pub display_missing_translations: bool,
pub override_missing_translations: Option<Box<dyn Fn(&String) -> String>>,
}Expand description
Options for the string templater.
Fields§
§safe_parse: boolIf true, StringTemplaterError::UnknownField` will never be returned.
display_missing_keys: boolIf true, display the missing keys in the data.
override_missing_keys: Option<Box<dyn Fn(&String) -> String>>Override the message for the missing data field.
display_missing_translations: boolIf true, display the missing keys in the translation.
override_missing_translations: Option<Box<dyn Fn(&String) -> String>>Override the message for the missing translations field.
Trait Implementations§
Source§impl Default for StringTemplaterOptions
impl Default for StringTemplaterOptions
Source§fn default() -> StringTemplaterOptions
fn default() -> StringTemplaterOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StringTemplaterOptions
impl !RefUnwindSafe for StringTemplaterOptions
impl !Send for StringTemplaterOptions
impl !Sync for StringTemplaterOptions
impl Unpin for StringTemplaterOptions
impl !UnwindSafe for StringTemplaterOptions
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.