[][src]Struct sixtyfps_corelib::properties::PropertyTracker

pub struct PropertyTracker { /* fields omitted */ }

This structure allow to run a closure that queries properties, and can report if any property we accessed have become dirty

Implementations

impl PropertyTracker[src]

pub fn is_dirty(&self) -> bool[src]

Any of the properties accessed during the last evaluation of the closure called from the last call to evaluate is pottentially dirty.

pub fn evaluate<R>(self: Pin<&Self>, f: impl FnOnce() -> R) -> R[src]

Evaluate the function, and record dependencies of properties accessed whithin this function.

pub fn evaluate_if_dirty(self: Pin<&Self>, f: impl FnOnce())[src]

call Self::evaluate if and only if it is dirty

pub fn set_dirty(&self)[src]

Mark this PropertyTracker as dirty

Trait Implementations

impl Default for PropertyTracker[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.