Struct trailing_cell::TcReader [] [src]

pub struct TcReader<T, M> where
    T: TakesMessage<M>, 
{ /* fields omitted */ }

TcReader<T,M> maintains its local T object. The reader will receive and apply incoming M messages to its T whenever explicitly invoked by update, update_limited or implicity by get_mut_fresh.

Access to the local copy is granted through the two get_mut variants. Without any messages, this local access is very fast. The reader can also be consumed to unwrap the local T.

The very explicit convention of using stale and fresh everywhere is to make unintentionally forgetting a crucial update less likely.

Methods

impl<T, M> TcReader<T, M> where
    T: TakesMessage<M>,
    M: Sync + Clone
[src]

[src]

Receives all waiting messages and applies them to the local object.

[src]

Receives any waiting messages up to a limit. collects and returns these messages in a vector.

[src]

Receives any waiting messages up to a limit. Returns number of messages received and applied.

[src]

combination of update_return and update_limited

[src]

Consumes the reader, returning the current version of the trailing T.

Trait Implementations

impl<T, M> Deref for TcReader<T, M> where
    T: TakesMessage<M>, 
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<T, M> DerefMut for TcReader<T, M> where
    T: TakesMessage<M>, 
[src]

[src]

Mutably dereferences the value.