Struct triple_buffer::TripleBuffer [] [src]

pub struct TripleBuffer<T: Clone + PartialEq + Send> { /* fields omitted */ }

A triple buffer, useful for nonblocking and thread-safe data sharing

A triple buffer is a single-producer single-consumer nonblocking communication channel which behaves like a shared variable: writer submits regular updates, reader accesses latest available value at any time.

The input and output fields of this struct are what producers and consumers actually use in practice. They can safely be moved away from the TripleBuffer struct after construction, and are further documented below.

Methods

impl<T: Clone + PartialEq + Send> TripleBuffer<T>
[src]

Construct a triple buffer with a certain initial value

Extract input and output of the triple buffer

Trait Implementations

impl<T: Debug + Clone + PartialEq + Send> Debug for TripleBuffer<T>
[src]

Formats the value using the given formatter.

impl<T: Clone + PartialEq + Send> Clone for TripleBuffer<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Clone + PartialEq + Send> PartialEq for TripleBuffer<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.