FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CultureService

    struct · ferroui-protranslate-core · v0.5.0

    struct CultureService
    

    Explicit, application-scoped culture state. Does not mutate any process locale.

    View source

    Members

    new

    fn new(culture: Culture) -> Self
    

    Source

    snapshot

    fn snapshot(self: &Self) -> CultureSnapshot
    

    Source

    current_culture

    fn current_culture(self: &Self) -> Culture
    

    Source

    current_ui_culture

    fn current_ui_culture(self: &Self) -> Culture
    

    Source

    flow_direction

    fn flow_direction(self: &Self) -> TextFlowDirection
    

    Source

    current_region

    fn current_region(self: &Self) -> Result<RegionProfile, TranslationError>
    

    Region and measurement metadata follow the formatting culture, while text direction follows the UI culture.

    Source

    is_metric

    fn is_metric(self: &Self) -> Result<bool, TranslationError>
    

    Source

    set_culture_name

    fn set_culture_name(self: &Self, name: &str) -> Result<bool, TranslationError>
    

    Source

    set_culture

    fn set_culture(self: &Self, culture: Culture) -> bool
    

    Source

    set_cultures

    fn set_cultures(self: &Self, culture: Culture, ui_culture: Culture) -> bool
    

    Source

    subscribe

    fn subscribe(self: &Self, callback: impl Fn(&CultureChangedEventArgs) -> () + 'static) -> Subscription
    

    Source

    subscriber_count

    fn subscriber_count(self: &Self) -> usize
    

    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
    • ErasedDestructor
    • IntoEither
    • Clone

    Availability

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