pub struct ContextKey {
pub key: String,
pub source_text: String,
pub translated_text: Option<String>,
}Expand description
A nearby key sharing a common prefix, used for translator context.
Fields§
§key: StringRelated key name
source_text: StringSource language text
translated_text: Option<String>Existing translation in the target locale, if available
Trait Implementations§
Source§impl Clone for ContextKey
impl Clone for ContextKey
Source§fn clone(&self) -> ContextKey
fn clone(&self) -> ContextKey
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 ContextKey
impl Debug for ContextKey
Source§impl<'de> Deserialize<'de> for ContextKey
impl<'de> Deserialize<'de> for ContextKey
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
Source§impl JsonSchema for ContextKey
impl JsonSchema for ContextKey
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ContextKey
impl RefUnwindSafe for ContextKey
impl Send for ContextKey
impl Sync for ContextKey
impl Unpin for ContextKey
impl UnsafeUnpin for ContextKey
impl UnwindSafe for ContextKey
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