[−][src]Struct aeron_rs::concurrent::atomic_buffer::AtomicBuffer
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]
&self,
position: Index,
expected: i32,
update: i32
) -> bool
pub fn compare_and_set_i64(
&self,
position: Index,
expected: i64,
update: i64
) -> bool
[src]
&self,
position: Index,
expected: i64,
update: i64
) -> bool
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]
&self,
offset: Index,
src_buffer: &AtomicBuffer,
src_offset: Index,
length: Index
)
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]
fn clone(&self) -> AtomicBuffer
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for AtomicBuffer
[src]
impl Debug for AtomicBuffer
[src]
impl Write for AtomicBuffer
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
[src]
fn flush(&mut self) -> Result<(), Error>
[src]
fn write_vectored(&mut self, bufs: &[IoSlice]) -> Result<usize, Error>
1.36.0[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
fn write_all_vectored(&mut self, bufs: &mut [IoSlice]) -> Result<(), Error>
[src]
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
1.0.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for AtomicBuffer
impl !Send for AtomicBuffer
impl !Sync for AtomicBuffer
impl Unpin for AtomicBuffer
impl UnwindSafe for AtomicBuffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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<W> WriteBytesExt for W where
W: Write + ?Sized,
W: Write + ?Sized,
fn write_u8(&mut self, n: u8) -> Result<(), Error>
fn write_i8(&mut self, n: i8) -> Result<(), Error>
fn write_u16<T>(&mut self, n: u16) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_i16<T>(&mut self, n: i16) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_u24<T>(&mut self, n: u32) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_i24<T>(&mut self, n: i32) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_u32<T>(&mut self, n: u32) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_i32<T>(&mut self, n: i32) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_u48<T>(&mut self, n: u64) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_i48<T>(&mut self, n: i64) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_u64<T>(&mut self, n: u64) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_i64<T>(&mut self, n: i64) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_u128<T>(&mut self, n: u128) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_i128<T>(&mut self, n: i128) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_uint<T>(&mut self, n: u64, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_int<T>(&mut self, n: i64, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_uint128<T>(&mut self, n: u128, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_int128<T>(&mut self, n: i128, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_f32<T>(&mut self, n: f32) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
fn write_f64<T>(&mut self, n: f64) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,