[][src]Struct aeron_rs::concurrent::atomic_buffer::AtomicBuffer

pub struct AtomicBuffer { /* fields omitted */ }

Wraps but does not own a region of shared memory

Methods

impl AtomicBuffer[src]

pub fn from_aligned(aligned: &AlignedBuffer) -> AtomicBuffer[src]

pub fn wrap(buffer: AtomicBuffer) -> Self[src]

pub fn wrap_slice(slice: &mut [u8]) -> Self[src]

pub fn new(ptr: *mut u8, len: Index) -> AtomicBuffer[src]

pub fn view(&self, offset: Index, len: Index) -> Self[src]

Create a view on the contents of the buffer starting from offset and spanning len bytes. Sets length of the "view" buffer to "len"

pub const fn capacity(&self) -> Index[src]

pub fn bounds_check(&self, idx: Index, len: Index)[src]

pub fn get<T: Copy>(&self, position: Index) -> T[src]

pub fn overlay_struct<T>(&self, position: Index) -> *mut T[src]

pub fn as_ref<T: Copy>(&self, position: Index) -> &T[src]

pub fn buffer(&self) -> *mut u8[src]

pub fn set_memory(&self, position: Index, len: Index, value: u8)[src]

pub fn get_volatile<T: Copy>(&self, position: Index) -> T[src]

pub fn put_ordered<T>(&self, position: Index, val: T)[src]

pub fn put<T>(&self, position: Index, val: T)[src]

pub fn put_atomic_i64(&self, offset: Index, val: i64)[src]

pub fn compare_and_set_i32(
    &self,
    position: Index,
    expected: i32,
    update: i32
) -> bool
[src]

pub fn compare_and_set_i64(
    &self,
    position: Index,
    expected: i64,
    update: i64
) -> bool
[src]

pub fn add_i64_ordered(&self, offset: Index, delta: i64)[src]

Single threaded increment with release semantics.

@param offset in the buffer of the word. @param delta for to be applied to the value.

pub fn put_bytes(&self, offset: Index, src: &[u8])[src]

Put bytes in to this buffer at specified offset

pub fn get_bytes(&self, offset: Index, dest: *mut u8, length: Index)[src]

pub fn copy_from(
    &self,
    offset: Index,
    src_buffer: &AtomicBuffer,
    src_offset: Index,
    length: Index
)
[src]

Copy "length" bytes from "src_buffer" starting from "src_offset" in to this buffer at given "offset" offset - offset in current (self) buffer to start coping from src_buffer - atomic buffer to copy data from src_offset - offset in src_buffer to start coping from length - number of bytes to copy

pub fn as_mutable_slice(&mut self) -> &mut [u8][src]

pub fn as_slice(&self) -> &[u8][src]

pub fn as_sub_slice(&self, index: Index, len: Index) -> &[u8][src]

pub fn get_string(&self, offset: Index) -> CString[src]

pub fn get_string_without_length(&self, offset: Index, length: Index) -> CString[src]

pub fn get_string_length(&self, offset: Index) -> Index[src]

pub fn put_string(&self, offset: Index, string: &[u8])[src]

This function expects ASCII string WITHOUT trailing zero as its input.

pub fn put_string_without_length(&self, offset: Index, string: &[u8]) -> Index[src]

pub fn get_and_add_i64(&self, offset: Index, delta: i64) -> i64[src]

Multi threaded increment.

@param offset in the buffer of the word. @param delta for to be applied to the value. @return the value before applying the delta.

Trait Implementations

impl Clone for AtomicBuffer[src]

impl Copy for AtomicBuffer[src]

impl Debug for AtomicBuffer[src]

impl Write for AtomicBuffer[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<W> WriteBytesExt for W where
    W: Write + ?Sized