pub struct ChangeTracker<T> { /* private fields */ }
Expand description

Tracks changes to data. Notifies listeners via a futures::Stream.

The data to be tracked is type T. The value of type T is wrapped in a private field. The AsRef trait is implemented so &T can be obtained by calling as_ref(). Read and write access can be gained by calling the modify method.

Subsribe to changes by calling get_changes.

See the module-level documentation for more information and a usage example.

Implementations

Create a new ChangeTracker which takes ownership of the data of type T.

Returns a futures::Stream that emits a message when a change occurs

The capacity of the underlying channel is specified with the capacity argument.

To remove a listener, drop the Receiver.

Modify the data value, notifying listeners upon change.

Trait Implementations

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.