[−][src]Struct aeron_rs::concurrent::atomic_buffer::AtomicBuffer
Wraps but does not own a region of shared memory
Implementations
impl AtomicBuffer
[src]
pub fn from_aligned(aligned: &AlignedBuffer) -> AtomicBufferⓘNotable traits for AtomicBuffer
impl Write for AtomicBuffer
[src]
Notable traits for AtomicBuffer
impl Write for AtomicBuffer
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ⓘNotable traits for AtomicBuffer
impl Write for AtomicBuffer
[src]
Notable traits for AtomicBuffer
impl Write for AtomicBuffer
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]
pub fn clone(&self) -> AtomicBufferⓘNotable traits for AtomicBuffer
impl Write for AtomicBuffer
[src]
Notable traits for AtomicBuffer
impl Write for AtomicBuffer
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for AtomicBuffer
[src]
impl Debug for AtomicBuffer
[src]
impl Send for AtomicBuffer
[src]
impl Sync for AtomicBuffer
[src]
impl Write for AtomicBuffer
[src]
pub fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
[src]
pub fn flush(&mut self) -> Result<(), Error>
[src]
pub fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>
1.36.0[src]
pub fn is_write_vectored(&self) -> bool
[src]
pub fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
pub fn write_all_vectored(
&mut self,
bufs: &mut [IoSlice<'_>]
) -> Result<(), Error>
[src]
&mut self,
bufs: &mut [IoSlice<'_>]
) -> Result<(), Error>
pub fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>
1.0.0[src]
pub fn by_ref(&mut self) -> &mut Self
1.0.0[src]
Auto Trait Implementations
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,