pub struct TranslateTextConfig { /* private fields */ }Implementations§
Source§impl TranslateTextConfig
impl TranslateTextConfig
Sourcepub fn from_toml_str(tomlstr: &str, debug: bool) -> Result<Self, String>
pub fn from_toml_str(tomlstr: &str, debug: bool) -> Result<Self, String>
Parse the configuration from a TOML string (load the data from file yourself).
Sourcepub fn with_id_suffix(self, suffix: impl Into<String>) -> Self
pub fn with_id_suffix(self, suffix: impl Into<String>) -> Self
A suffix to assign when minting new IDs for resources and translations
Sourcepub fn with_force_when_unchanged(self) -> Self
pub fn with_force_when_unchanged(self) -> Self
Create any texts and annotations even if the translation turn out exactly the same as the original
Sourcepub fn with_debug(self, value: bool) -> Self
pub fn with_debug(self, value: bool) -> Self
A suffix to assign when minting new IDs for resources and translations
pub fn compile_queries<'a>( &'a self, ) -> Result<HashMap<String, Query<'a>>, String>
Trait Implementations§
Source§impl Clone for TranslateTextConfig
impl Clone for TranslateTextConfig
Source§fn clone(&self) -> TranslateTextConfig
fn clone(&self) -> TranslateTextConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TranslateTextConfig
impl Debug for TranslateTextConfig
Source§impl Default for TranslateTextConfig
impl Default for TranslateTextConfig
Source§fn default() -> TranslateTextConfig
fn default() -> TranslateTextConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TranslateTextConfig
impl<'de> Deserialize<'de> for TranslateTextConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TranslateTextConfig
impl RefUnwindSafe for TranslateTextConfig
impl Send for TranslateTextConfig
impl Sync for TranslateTextConfig
impl Unpin for TranslateTextConfig
impl UnwindSafe for TranslateTextConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more