pub struct RandomAccessMemory { /* private fields */ }Expand description
In-memory storage for random access
Implementations§
Trait Implementations§
Source§impl Clone for RandomAccessMemory
impl Clone for RandomAccessMemory
Source§fn clone(&self) -> RandomAccessMemory
fn clone(&self) -> RandomAccessMemory
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RandomAccessMemory
impl Debug for RandomAccessMemory
Source§impl Default for RandomAccessMemory
impl Default for RandomAccessMemory
Source§impl RandomAccess for RandomAccessMemory
impl RandomAccess for RandomAccessMemory
Source§fn read(
&self,
offset: u64,
length: u64,
) -> BoxFuture<Result<Vec<u8>, RandomAccessError>>
fn read( &self, offset: u64, length: u64, ) -> BoxFuture<Result<Vec<u8>, RandomAccessError>>
Read a sequence of bytes at an
offset from the backend. Read moreSource§fn del(
&self,
offset: u64,
length: u64,
) -> BoxFuture<Result<(), RandomAccessError>>
fn del( &self, offset: u64, length: u64, ) -> BoxFuture<Result<(), RandomAccessError>>
Delete a sequence of bytes of given
length at an offset from the backend.
This either sets the bytes in the given slice to zeroes, or if
offset + length >= RandomAccess::len() is the same as
truncate(offset). Read moreSource§fn truncate(&self, length: u64) -> BoxFuture<Result<(), RandomAccessError>>
fn truncate(&self, length: u64) -> BoxFuture<Result<(), RandomAccessError>>
Resize the sequence of bytes so that RandomAccess::len() is set to
length. If length < RandomAccess::len(), the bytes are disregarded.
If length > RandomAccess::len(), the storage is zero-padded. Read moreAuto Trait Implementations§
impl Freeze for RandomAccessMemory
impl RefUnwindSafe for RandomAccessMemory
impl Send for RandomAccessMemory
impl Sync for RandomAccessMemory
impl Unpin for RandomAccessMemory
impl UnsafeUnpin for RandomAccessMemory
impl UnwindSafe for RandomAccessMemory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more