FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    WeakRef

    struct · ferroui-base · v0.5.0

    struct WeakRef<T: ObjectType>
    

    A weak reference to an object of class T or a class derived from it.

    View source

    Members

    upgrade

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

    Returns a strong reference if the object is still alive.

    Source

    upcast

    fn upcast<U: ObjectType>(self: Self) -> WeakRef<U>
    where T: Upcast<U>
    

    Converts the handle to a handle of a base class.

    Source

    points_to

    fn points_to<U: ObjectType>(self: &Self, object: &Ref<U>) -> bool
    

    Whether the weak reference points at object.

    Source

    ptr_eq

    fn ptr_eq<U: ObjectType>(self: &Self, other: &WeakRef<U>) -> bool
    

    Whether two weak references point at the same object, alive or not.

    Source

    Trait implementations

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

    Availability

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