Struct triple_buffer::TripleBuffer
[−]
[src]
pub struct TripleBuffer<T: 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: the producer submits regular updates, and the consumer accesses the latest available value whenever it feels like it.
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 + Send> TripleBuffer<T>
[src]
impl<T: Send> TripleBuffer<T>
[src]
Trait Implementations
impl<T: Debug + Send> Debug for TripleBuffer<T>
[src]
impl<T: Default + Send> Default for TripleBuffer<T>
[src]
impl<T: Clone + Send> Clone for TripleBuffer<T>
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more