LocalBindingReload
struct · ferroui-base · v0.5.0
struct LocalBindingReload<T: PropertyValue>
A prepared replacement (or removal) of a supported local binding on a preserved object. Preparation constructs an inactive expression for the actual target; it does not start subscriptions or change the visible value.
This primitive is for explicit reload adapters. The adapter must establish XAML ownership and supply the correct source, namescope and service context. Synchronous one/two-way bindings are supported; other expression kinds fail preparation. Direct properties, animations and arbitrary observer side effects are outside this contract.
Commit retains the original subscriptions until finish. rollback restores
the original expression and user input without sending that input to either
model. Dropping an unfinished change attempts rollback.
Members
prepare
fn prepare(target: &Ref<FerroObject>, property: &'static StyledProperty<T>, replacement: Option<&dyn BindingBase>, anchor: Option<&Ref<FerroObject>>) -> Result<Self, String>
prepare_value
fn prepare_value(target: &Ref<FerroObject>, property: &'static StyledProperty<T>, value: Option<T>) -> Result<Self, String>
Replaces a binding with a converted literal, or clears its contribution.
commit
fn commit(self: &mut Self) -> Result<(), String>
rollback
fn rollback(self: &mut Self) -> Result<(), String>
finish
fn finish(self: &mut Self) -> Result<(), String>
Accepts the replacement and releases the original subscriptions.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherDrop
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.