[−][src]Struct triple_buffer::TripleBuffer
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: Default + Send> Default for TripleBuffer<T>
[src]
impl<T: Debug + Send> Debug for TripleBuffer<T>
[src]
Auto Trait Implementations
impl<T> Send for TripleBuffer<T>
impl<T> Sync for TripleBuffer<T>
impl<T> Unpin for TripleBuffer<T>
impl<T> !UnwindSafe for TripleBuffer<T>
impl<T> !RefUnwindSafe for TripleBuffer<T>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,