FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    prepare

    fn prepare(target: &Ref<FerroObject>, property: &'static StyledProperty<T>, replacement: Option<&dyn BindingBase>, anchor: Option<&Ref<FerroObject>>) -> Result<Self, String>
    

    Source

    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.

    Source

    commit

    fn commit(self: &mut Self) -> Result<(), String>
    

    Source

    rollback

    fn rollback(self: &mut Self) -> Result<(), String>
    

    Source

    finish

    fn finish(self: &mut Self) -> Result<(), String>
    

    Accepts the replacement and releases the original subscriptions.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither
    • Drop

    Availability

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