Struct triple_buffer::TripleBuffer
source · [−]pub struct TripleBuffer<T: Send> { /* private fields */ }
Expand description
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.
Implementations
sourceimpl<T: Clone + Send> TripleBuffer<T>
impl<T: Clone + Send> TripleBuffer<T>
Trait Implementations
sourceimpl<T: Debug + Send> Debug for TripleBuffer<T>
impl<T: Debug + Send> Debug for TripleBuffer<T>
Auto Trait Implementations
impl<T> !RefUnwindSafe for TripleBuffer<T>
impl<T> Send for TripleBuffer<T>
impl<T> Sync for TripleBuffer<T>
impl<T> Unpin for TripleBuffer<T>
impl<T> !UnwindSafe for TripleBuffer<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more