pub struct ParsedCatalog {
pub locale: Option<String>,
pub semantics: CatalogSemantics,
pub headers: BTreeMap<String, String>,
pub messages: Vec<CatalogMessage>,
pub diagnostics: Vec<Diagnostic>,
}Expand description
Parsed catalog plus diagnostics and normalized headers.
Fields§
§locale: Option<String>Declared or overridden catalog locale.
semantics: CatalogSemanticsHigh-level semantics used to parse the catalog.
headers: BTreeMap<String, String>Normalized header map keyed by header name.
messages: Vec<CatalogMessage>Parsed catalog messages in source order.
diagnostics: Vec<Diagnostic>Non-fatal diagnostics collected while parsing.
Implementations§
Source§impl ParsedCatalog
impl ParsedCatalog
Sourcepub fn into_normalized_view(self) -> Result<NormalizedParsedCatalog, ApiError>
pub fn into_normalized_view(self) -> Result<NormalizedParsedCatalog, ApiError>
Builds a lookup-oriented view that rejects duplicate message keys.
§Errors
Returns ApiError::Conflict when the parsed catalog contains
duplicate msgid/msgctxt pairs.
Trait Implementations§
Source§impl Clone for ParsedCatalog
impl Clone for ParsedCatalog
Source§fn clone(&self) -> ParsedCatalog
fn clone(&self) -> ParsedCatalog
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 ParsedCatalog
impl Debug for ParsedCatalog
Source§impl PartialEq for ParsedCatalog
impl PartialEq for ParsedCatalog
impl Eq for ParsedCatalog
impl StructuralPartialEq for ParsedCatalog
Auto Trait Implementations§
impl Freeze for ParsedCatalog
impl RefUnwindSafe for ParsedCatalog
impl Send for ParsedCatalog
impl Sync for ParsedCatalog
impl Unpin for ParsedCatalog
impl UnsafeUnpin for ParsedCatalog
impl UnwindSafe for ParsedCatalog
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