FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ResourcesChangedEventArgs

    struct · ferroui-base · v0.5.0

    struct ResourcesChangedEventArgs
    

    Describes a change to the resources visible to a resource host.

    Each notification carries a new sequence number, which lets a host that is reached through more than one path ignore a notification it has already handled.

    A notification is made after the change it describes: a resource looked up after create made the arguments of a change sees that change. A dynamic resource remembers the last_sequence_number when it looks its resource up and does not look it up again for a notification that is not newer.

    View source

    Members

    sequence_number

    sequence_number: i32
    

    Source

    new

    fn new(sequence_number: i32) -> Self
    

    Source

    create

    fn create() -> Self
    

    Creates event arguments with the next sequence number.

    Source

    last_sequence_number

    fn last_sequence_number() -> i32
    

    The sequence number of the last arguments create made on this thread; 0 before the first.

    Source

    is_newer_than

    fn is_newer_than(self: &Self, sequence_number: i32) -> bool
    

    Whether these arguments describe a change made after the moment at which sequence_number was the last_sequence_number. Arguments that create did not number (the default, sequence number 0) are newer than any moment.

    Source

    Trait implementations

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

    Availability

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