FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    BehaviorCollection

    struct · ferroui-xaml-interactivity · v0.5.0

    struct BehaviorCollection
    

    Represents a collection of IBehaviors with a shared associated_object.

    The collection is a notifying list of objects (FerroList<FerroObject>); every item must be a behavior. It is a reference object: clones refer to the same collection and compare by identity.

    View source

    Members

    new

    fn new() -> Self
    

    Initializes a new instance of the BehaviorCollection class.

    Source

    list

    fn list(self: &Self) -> &FerroList<Ref<FerroObject>>
    

    The list of the collection.

    Source

    associated_object

    fn associated_object(self: &Self) -> Option<Ref<FerroObject>>
    

    Gets the object to which the BehaviorCollection is attached.

    Source

    attach

    fn attach(self: &Self, associated_object: impl Into<Nullable<FerroObject>>)
    

    Attaches the collection of behaviors to the specified object.

    Panics

    Panics if the BehaviorCollection is already attached to a different object.

    Source

    detach

    fn detach(self: &Self)
    

    Detaches the collection of behaviors from the associated_object.

    Source

    Trait implementations

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

    Availability

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