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.
Members
TYPEto_refvalue_propertynewvalueset_evaluated_valueevaluateevaluate_stringupdate_bindingclear_data_contextdisposetry_create
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<BindingEvaluator>
Returns a strong reference to this object.
value_property
fn value_property() -> &'static StyledProperty<Option<BoxedValue>>
Defines the Value property.
new
fn new() -> Ref<Self>
value
fn value(self: &Self) -> Option<BoxedValue>
The evaluated value.
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).
evaluate
fn evaluate(self: &Self, data_context: &Option<BoxedValue>) -> Option<BoxedValue>
Evaluates the binding against a data context.
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.
update_binding
fn update_binding(self: &Self, binding: &AssignedBinding)
Replaces the evaluated binding.
clear_data_context
fn clear_data_context(self: &Self)
Clears the data context.
dispose
fn dispose(self: &Self)
Releases the binding.
try_create
fn try_create(binding: Option<&AssignedBinding>) -> Option<Ref<BindingEvaluator>>
Creates an evaluator for a binding, if there is one.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtStyledElementImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<BindingEvaluator>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplStyledElementImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.