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 clear(). Use read() or deref (*dirty_variable) to access the inner value.

Methods

impl<T> Dirty<T>
[src]

[src]

Create a new Dirty.

[src]

Returns true if dirty, false otherwise.

[src]

Writable value return, sets the dirty flag.

[src]

Read the value.

[src]

Clears the dirty flag.

[src]

Read the value only if modified since last read.

Trait Implementations

impl<T> Deref for Dirty<T>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<T> Default for Dirty<T> where
    T: Default
[src]

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl<T> Send for Dirty<T> where
    T: Send

impl<T> Sync for Dirty<T> where
    T: Sync