pub struct CatalogMessage {
pub msgid: String,
pub msgctxt: Option<String>,
pub translation: TranslationShape,
pub comments: Vec<String>,
pub origin: Vec<CatalogOrigin>,
pub obsolete: bool,
pub extra: Option<CatalogMessageExtra>,
}Expand description
Public message representation returned by super::parse_catalog.
Fields§
§msgid: StringSource message identifier.
msgctxt: Option<String>Optional gettext message context.
translation: TranslationShapePublic translation representation.
comments: Vec<String>Extracted comments preserved from the source catalog.
origin: Vec<CatalogOrigin>Source origins preserved from PO references.
obsolete: boolWhether the message is marked obsolete.
extra: Option<CatalogMessageExtra>Optional additional translator-facing PO metadata.
Implementations§
Source§impl CatalogMessage
impl CatalogMessage
Sourcepub fn key(&self) -> CatalogMessageKey
pub fn key(&self) -> CatalogMessageKey
Returns the lookup key for this message.
Sourcepub fn effective_translation(&self) -> EffectiveTranslationRef<'_>
pub fn effective_translation(&self) -> EffectiveTranslationRef<'_>
Returns the effective translation without source-locale fallback.
Trait Implementations§
Source§impl Clone for CatalogMessage
impl Clone for CatalogMessage
Source§fn clone(&self) -> CatalogMessage
fn clone(&self) -> CatalogMessage
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 CatalogMessage
impl Debug for CatalogMessage
Source§impl PartialEq for CatalogMessage
impl PartialEq for CatalogMessage
impl Eq for CatalogMessage
impl StructuralPartialEq for CatalogMessage
Auto Trait Implementations§
impl Freeze for CatalogMessage
impl RefUnwindSafe for CatalogMessage
impl Send for CatalogMessage
impl Sync for CatalogMessage
impl Unpin for CatalogMessage
impl UnsafeUnpin for CatalogMessage
impl UnwindSafe for CatalogMessage
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