pub struct RonTx {
pub text: String,
pub description: Option<String>,
pub meaning: Option<String>,
pub placeholders: BTreeMap<String, RonPlaceholder>,
}Expand description
The checked payload of RON’s Tx(text: ..., ...) authoring variant.
Applications normally embed this as the payload for their own enum variant;
the CLI scanner recognizes the conventional Tx spelling independently.
Fields§
§text: StringSource-language message text.
description: Option<String>Translator-facing context that does not affect message identity.
meaning: Option<String>Optional semantic discriminator used when computing message identity.
placeholders: BTreeMap<String, RonPlaceholder>Unbound placeholder schemas for a source template.
Implementations§
Source§impl RonTx
impl RonTx
Sourcepub fn into_localized_string(self) -> Result<LocalizedString, TroxValueError>
pub fn into_localized_string(self) -> Result<LocalizedString, TroxValueError>
Validates this RON payload and converts it into an owned localized string.
The description is authoring metadata and is intentionally not retained in the runtime value or used to compute its identity.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RonTx
impl<'de> Deserialize<'de> for RonTx
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
impl Eq for RonTx
impl StructuralPartialEq for RonTx
Auto Trait Implementations§
impl Freeze for RonTx
impl RefUnwindSafe for RonTx
impl Send for RonTx
impl Sync for RonTx
impl Unpin for RonTx
impl UnsafeUnpin for RonTx
impl UnwindSafe for RonTx
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