FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    WeakValue

    enum · ferroui-base · v0.5.0

    enum WeakValue
    

    A reference to a binding source that does not keep it alive.

    Objects of the class hierarchy and registered reference (model) types are held weakly, as the managed implementation holds every source. Plain values (numbers, strings, value structs) own nothing that could form a cycle and exist only as the transient box that carries them, so they are held by value.

    View source

    Members

    Reference

    Reference(std::rc::Weak<dyn AnyValue>)
    

    A shared model object.

    Source

    Object

    Object(crate::WeakRef<crate::FerroObject>, std::any::TypeId)
    

    An object of the class hierarchy and the handle type it was seen as.

    Source

    Value

    Value(crate::BoxedValue)
    

    A plain value.

    Source

    new

    fn new(value: &BoxedValue) -> Self
    

    Source

    upgrade

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

    The source, if it is still alive.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • PartialEq

    Availability

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