FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Translation

    struct · ferroui-protranslate · v0.5.0

    struct Translation
    

    Native attached localization properties. Culture and direction inherit through FerroUI's inheritance tree. Each target owns its subscription and the callback holds only a weak target reference.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this type.

    Source

    key_property

    fn key_property() -> &'static AttachedProperty<Option<String>>
    

    Source

    fallback_value_property

    fn fallback_value_property() -> &'static AttachedProperty<Option<BoxedValue>>
    

    Source

    string_format_property

    fn string_format_property() -> &'static AttachedProperty<Option<String>>
    

    Source

    culture_property

    fn culture_property() -> &'static AttachedProperty<Option<String>>
    

    Source

    auto_flow_direction_property

    fn auto_flow_direction_property() -> &'static AttachedProperty<bool>
    

    Source

    source_property

    fn source_property() -> &'static AttachedProperty<Option<TranslationBindingSource>>
    

    Source

    error_property

    fn error_property() -> &'static AttachedProperty<Option<String>>
    

    Last failure of attached-property evaluation, cleared after a successful refresh.

    Source

    set_service

    fn set_service(service: TranslationService)
    

    Configures the default source without invalidating already-created bindings.

    Source

    get_source

    fn get_source(target: &FerroObject) -> TranslationBindingSource
    

    Source

    set_source

    fn set_source(target: &FerroObject, source: Option<TranslationBindingSource>)
    

    Source

    get_key

    fn get_key(target: &FerroObject) -> Option<String>
    

    Source

    set_key

    fn set_key(target: &FerroObject, key: Option<String>)
    

    Source

    get_fallback_value

    fn get_fallback_value(target: &FerroObject) -> Option<BoxedValue>
    

    Source

    set_fallback_value

    fn set_fallback_value(target: &FerroObject, value: Option<BoxedValue>)
    

    Source

    set_fallback_text

    fn set_fallback_text(target: &FerroObject, value: Option<String>)
    

    Sets a text fallback while the native property can hold any content object.

    Source

    get_string_format

    fn get_string_format(target: &FerroObject) -> Option<String>
    

    Source

    set_string_format

    fn set_string_format(target: &FerroObject, value: Option<String>)
    

    Source

    get_culture

    fn get_culture(target: &FerroObject) -> Option<String>
    

    Source

    set_culture

    fn set_culture(target: &FerroObject, value: Option<String>)
    

    Source

    get_auto_flow_direction

    fn get_auto_flow_direction(target: &FerroObject) -> bool
    

    Source

    set_auto_flow_direction

    fn set_auto_flow_direction(target: &FerroObject, value: bool)
    

    Source

    to_flow_direction

    fn to_flow_direction(culture: &Culture) -> FlowDirection
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • StaticType
    • MarkupTyped

    Availability

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