FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TranslationCatalog

    struct · ferroui-protranslate-formats · v0.5.0

    struct TranslationCatalog
    

    An ordered collection of normalized translations and its source language.

    View source

    Members

    name

    name: Option<String>
    

    Source

    source_culture

    source_culture: Option<String>
    

    Source

    entries

    entries: Vec<TranslationCatalogEntry>
    

    Source

    metadata

    metadata: std::collections::BTreeMap<String, String>
    

    Format-specific document metadata, retained independently of its translations.

    Source

    add

    fn add(self: &mut Self, key: impl Into<String>, culture: Option<&str>, value: impl Into<String>) -> &mut TranslationCatalogEntry
    

    Source

    cultures

    fn cultures(self: &Self) -> Vec<String>
    

    Unique, case-insensitively ordered culture tags.

    Source

    to_dictionary

    fn to_dictionary(self: &Self, culture: Option<&str>) -> BTreeMap<String, String>
    

    Select exactly one culture, preserving the source API's last-entry-wins rule.

    Source

    validate

    fn validate(self: &Self) -> Vec<TranslationFormatDiagnostic>
    

    Validate record identity without changing the original order or discarding duplicates.

    Source

    normalize_culture_name

    fn normalize_culture_name(culture: Option<&str>) -> String
    

    Normalize the usual hyphen/underscore BCP-47 spelling without assuming OS locale data.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • DeserializeOwned
    • Clone
    • Debug
    • Default
    • Eq
    • StructuralPartialEq
    • PartialEq
    • Serialize
    • Deserialize<'de>

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.