FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ReflectionBinding

    struct · ferroui-base · v0.5.0

    struct ReflectionBinding
    

    A binding whose path is text, resolved at run time against the metadata that the objects along the path declared: registered properties for objects of the class hierarchy, declared model metadata for everything else.

    A binding is a mutable reference object: it is created with ReflectionBinding::empty or ReflectionBinding::new, configured property by property (or with the chaining with_* forms) and shared as Rc<ReflectionBinding>, which converts to Rc<dyn BindingBase>. Handles compare by identity. The properties are read when the binding is instantiated on a target: changing them afterwards affects later instances only.

    View source

    Members

    snapshot_for_reload

    fn snapshot_for_reload(self: &Self) -> ::std::rc::Rc<Self>
    

    An independent description for a development transaction. Keep it only through preparation: explicit sources can own application objects.

    Source

    converter

    fn converter(self: &Self) -> Option<Rc<dyn IValueConverter>>
    

    The converter to use.

    Source

    set_converter

    fn set_converter(self: &Self, value: Option<Rc<dyn IValueConverter>>)
    

    Source

    with_converter_value

    fn with_converter_value(self: ::std::rc::Rc<Self>, value: Option<Rc<dyn IValueConverter>>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    converter_culture

    fn converter_culture(self: &Self) -> Option<CultureInfo>
    

    The culture in which to evaluate the converter. None (the default) uses the current culture.

    Source

    set_converter_culture

    fn set_converter_culture(self: &Self, value: Option<CultureInfo>)
    

    Source

    with_converter_culture

    fn with_converter_culture(self: ::std::rc::Rc<Self>, value: Option<CultureInfo>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    converter_parameter

    fn converter_parameter(self: &Self) -> Option<BoxedValue>
    

    A parameter to pass to the converter.

    Source

    set_converter_parameter

    fn set_converter_parameter(self: &Self, value: Option<BoxedValue>)
    

    Source

    with_converter_parameter

    fn with_converter_parameter(self: ::std::rc::Rc<Self>, value: Option<BoxedValue>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    delay

    fn delay(self: &Self) -> i32
    

    The amount of time, in milliseconds, to wait before updating the binding source after the value on the target changes.

    Source

    set_delay

    fn set_delay(self: &Self, value: i32)
    

    Source

    with_delay

    fn with_delay(self: ::std::rc::Rc<Self>, value: i32) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    element_name

    fn element_name(self: &Self) -> Option<String>
    

    The name of the element to use as the binding source.

    Source

    set_element_name

    fn set_element_name(self: &Self, value: Option<String>)
    

    Source

    with_element_name

    fn with_element_name(self: ::std::rc::Rc<Self>, value: Option<String>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    fallback_value

    fn fallback_value(self: &Self) -> Option<BoxedValue>
    

    The value to use when the binding is unable to produce a value; the unset marker for none.

    Source

    set_fallback_value

    fn set_fallback_value(self: &Self, value: Option<BoxedValue>)
    

    Source

    with_fallback_value

    fn with_fallback_value(self: ::std::rc::Rc<Self>, value: Option<BoxedValue>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    mode

    fn mode(self: &Self) -> BindingMode
    

    The binding mode.

    Source

    set_mode

    fn set_mode(self: &Self, value: BindingMode)
    

    Source

    with_mode

    fn with_mode(self: ::std::rc::Rc<Self>, value: BindingMode) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    path

    fn path(self: &Self) -> String
    

    The binding path.

    Source

    set_path

    fn set_path(self: &Self, value: String)
    

    Source

    with_path

    fn with_path(self: ::std::rc::Rc<Self>, value: String) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    priority

    fn priority(self: &Self) -> BindingPriority
    

    The binding priority.

    Source

    set_priority

    fn set_priority(self: &Self, value: BindingPriority)
    

    Source

    with_priority

    fn with_priority(self: ::std::rc::Rc<Self>, value: BindingPriority) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    relative_source

    fn relative_source(self: &Self) -> Option<Rc<RelativeSource>>
    

    The relative source for the binding.

    Source

    set_relative_source

    fn set_relative_source(self: &Self, value: Option<Rc<RelativeSource>>)
    

    Source

    with_relative_source

    fn with_relative_source(self: ::std::rc::Rc<Self>, value: Option<Rc<RelativeSource>>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    source

    fn source(self: &Self) -> Option<BoxedValue>
    

    The source for the binding; the unset marker (the default) for none.

    Source

    set_source

    fn set_source(self: &Self, value: Option<BoxedValue>)
    

    Source

    with_source

    fn with_source(self: ::std::rc::Rc<Self>, value: Option<BoxedValue>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    string_format

    fn string_format(self: &Self) -> Option<String>
    

    The string format.

    Source

    set_string_format

    fn set_string_format(self: &Self, value: Option<String>)
    

    Source

    with_string_format

    fn with_string_format(self: ::std::rc::Rc<Self>, value: Option<String>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    target_null_value

    fn target_null_value(self: &Self) -> Option<BoxedValue>
    

    The value to use when the binding produces null; the unset marker for none.

    Source

    set_target_null_value

    fn set_target_null_value(self: &Self, value: Option<BoxedValue>)
    

    Source

    with_target_null_value

    fn with_target_null_value(self: ::std::rc::Rc<Self>, value: Option<BoxedValue>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    update_source_trigger

    fn update_source_trigger(self: &Self) -> UpdateSourceTrigger
    

    What triggers updates of the binding source in two-way and one-way-to-source bindings.

    Source

    set_update_source_trigger

    fn set_update_source_trigger(self: &Self, value: UpdateSourceTrigger)
    

    Source

    with_update_source_trigger

    fn with_update_source_trigger(self: ::std::rc::Rc<Self>, value: UpdateSourceTrigger) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    default_anchor

    fn default_anchor(self: &Self) -> Option<WeakRef<FerroObject>>
    

    The anchor to use if the target is not an element.

    Source

    set_default_anchor

    fn set_default_anchor(self: &Self, value: Option<WeakRef<FerroObject>>)
    

    Source

    with_default_anchor

    fn with_default_anchor(self: ::std::rc::Rc<Self>, value: Option<WeakRef<FerroObject>>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    name_scope

    fn name_scope(self: &Self) -> Option<Weak<dyn INameScope>>
    

    The name scope in which named elements are looked up.

    Source

    set_name_scope

    fn set_name_scope(self: &Self, value: Option<Weak<dyn INameScope>>)
    

    Source

    with_name_scope

    fn with_name_scope(self: ::std::rc::Rc<Self>, value: Option<Weak<dyn INameScope>>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    empty

    fn empty() -> Rc<Self>
    

    Creates a binding without a path (the parameterless constructor).

    Source

    new

    fn new(path: &str) -> Rc<Self>
    

    Creates a binding with the given path.

    Source

    construct

    fn construct(path: &str) -> Self
    

    The class data of a binding with the given path, for a type that derives from this one.

    Source

    with_converter

    fn with_converter(self: Rc<Self>, converter: Rc<dyn IValueConverter>) -> Rc<Self>
    

    The chaining form of set_converter, for a converter.

    Source

    try_create_instance

    fn try_create_instance(self: &Self, target: &FerroObject, target_property: Option<&'static FerroProperty>, anchor: Option<&Ref<FerroObject>>) -> Result<Rc<BindingExpression>, ExpressionParseError>
    

    Instantiates the binding, reporting a malformed path as an error instead of panicking.

    Source

    Trait implementations

    Availability

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