FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    BindingEvaluator

    struct · ferroui-controls · v0.5.0

    struct BindingEvaluator
    

    Evaluates a binding against arbitrary data contexts.

    The value is untyped; evaluate_string gives its text form for the consumers that evaluate text.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<BindingEvaluator>
    

    Returns a strong reference to this object.

    Source

    value_property

    fn value_property() -> &'static StyledProperty<Option<BoxedValue>>
    

    Defines the Value property.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    value

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

    The evaluated value.

    Source

    set_evaluated_value

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

    Sets the evaluated value (the setter of Value; set_value is the property setter of every object).

    Source

    evaluate

    fn evaluate(self: &Self, data_context: &Option<BoxedValue>) -> Option<BoxedValue>
    

    Evaluates the binding against a data context.

    Source

    evaluate_string

    fn evaluate_string(self: &Self, data_context: &Option<BoxedValue>) -> Option<String>
    

    Evaluates the binding against a data context and returns the text form of the value, if it has one.

    Source

    update_binding

    fn update_binding(self: &Self, binding: &AssignedBinding)
    

    Replaces the evaluated binding.

    Source

    clear_data_context

    fn clear_data_context(self: &Self)
    

    Clears the data context.

    Source

    dispose

    fn dispose(self: &Self)
    

    Releases the binding.

    Source

    try_create

    fn try_create(binding: Option<&AssignedBinding>) -> Option<Ref<BindingEvaluator>>
    

    Creates an evaluator for a binding, if there is one.

    Source

    Trait implementations

    Availability

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