Struct dirty::Dirty [] [src]

pub struct Dirty<T> { /* fields omitted */ }

Dirty wraps a value of type T with functions similiar to that of a Read/Write lock but simply sets a dirty flag on write(), reset on read()

Methods

impl<T> Dirty<T>
[src]

Create a new Dirty

Returns true if dirty, false otherwise

Writable value return, sets the dirty flag

Read the value and clear the dirty flag if set

Read the value only if modified since last read, clears the dirty flag