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.
Members
TYPEkey_propertyfallback_value_propertystring_format_propertyculture_propertyauto_flow_direction_propertysource_propertyerror_propertyset_serviceget_sourceset_sourceget_keyset_keyget_fallback_valueset_fallback_valueset_fallback_textget_string_formatset_string_formatget_cultureset_cultureget_auto_flow_directionset_auto_flow_directionto_flow_direction
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this type.
key_property
fn key_property() -> &'static AttachedProperty<Option<String>>
fallback_value_property
fn fallback_value_property() -> &'static AttachedProperty<Option<BoxedValue>>
string_format_property
fn string_format_property() -> &'static AttachedProperty<Option<String>>
culture_property
fn culture_property() -> &'static AttachedProperty<Option<String>>
auto_flow_direction_property
fn auto_flow_direction_property() -> &'static AttachedProperty<bool>
source_property
fn source_property() -> &'static AttachedProperty<Option<TranslationBindingSource>>
error_property
fn error_property() -> &'static AttachedProperty<Option<String>>
Last failure of attached-property evaluation, cleared after a successful refresh.
set_service
fn set_service(service: TranslationService)
Configures the default source without invalidating already-created bindings.
get_source
fn get_source(target: &FerroObject) -> TranslationBindingSource
set_source
fn set_source(target: &FerroObject, source: Option<TranslationBindingSource>)
get_key
fn get_key(target: &FerroObject) -> Option<String>
set_key
fn set_key(target: &FerroObject, key: Option<String>)
get_fallback_value
fn get_fallback_value(target: &FerroObject) -> Option<BoxedValue>
set_fallback_value
fn set_fallback_value(target: &FerroObject, value: Option<BoxedValue>)
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.
get_string_format
fn get_string_format(target: &FerroObject) -> Option<String>
set_string_format
fn set_string_format(target: &FerroObject, value: Option<String>)
get_culture
fn get_culture(target: &FerroObject) -> Option<String>
set_culture
fn set_culture(target: &FerroObject, value: Option<String>)
get_auto_flow_direction
fn get_auto_flow_direction(target: &FerroObject) -> bool
set_auto_flow_direction
fn set_auto_flow_direction(target: &FerroObject, value: bool)
to_flow_direction
fn to_flow_direction(culture: &Culture) -> FlowDirection
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherStaticTypeMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.