#[repr(C)]pub struct aws_ring_buffer {
pub allocator: *mut aws_allocator,
pub allocation: *mut u8,
pub head: aws_atomic_var,
pub tail: aws_atomic_var,
pub allocation_end: *mut u8,
}
Expand description
Lockless ring buffer implementation that is thread safe assuming a single thread acquires and a single thread releases. For any other use case (other than the single-threaded use-case), you must manage thread-safety manually.
Also, a very important note: release must happen in the same order as acquire. If you do not your application, and possibly computers within a thousand mile radius, may die terrible deaths, and the local drinking water will be poisoned for generations with fragments of what is left of your radioactive corrupted memory.
Fields
allocator: *mut aws_allocator
allocation: *mut u8
head: aws_atomic_var
tail: aws_atomic_var
allocation_end: *mut u8
Trait Implementations
sourceimpl Clone for aws_ring_buffer
impl Clone for aws_ring_buffer
sourcefn clone(&self) -> aws_ring_buffer
fn clone(&self) -> aws_ring_buffer
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for aws_ring_buffer
impl Debug for aws_ring_buffer
sourceimpl Default for aws_ring_buffer
impl Default for aws_ring_buffer
sourceimpl PartialEq<aws_ring_buffer> for aws_ring_buffer
impl PartialEq<aws_ring_buffer> for aws_ring_buffer
sourcefn eq(&self, other: &aws_ring_buffer) -> bool
fn eq(&self, other: &aws_ring_buffer) -> bool
impl Copy for aws_ring_buffer
impl Eq for aws_ring_buffer
impl StructuralEq for aws_ring_buffer
impl StructuralPartialEq for aws_ring_buffer
Auto Trait Implementations
impl RefUnwindSafe for aws_ring_buffer
impl !Send for aws_ring_buffer
impl !Sync for aws_ring_buffer
impl Unpin for aws_ring_buffer
impl UnwindSafe for aws_ring_buffer
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