pub struct RandomAccessDisk { /* private fields */ }Expand description
Main constructor.
Implementations§
Trait Implementations§
Source§impl Clone for RandomAccessDisk
impl Clone for RandomAccessDisk
Source§fn clone(&self) -> RandomAccessDisk
fn clone(&self) -> RandomAccessDisk
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 RandomAccessDisk
impl Debug for RandomAccessDisk
Source§impl RandomAccess for RandomAccessDisk
impl RandomAccess for RandomAccessDisk
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 RandomAccessDisk
impl !RefUnwindSafe for RandomAccessDisk
impl Send for RandomAccessDisk
impl Sync for RandomAccessDisk
impl Unpin for RandomAccessDisk
impl UnsafeUnpin for RandomAccessDisk
impl !UnwindSafe for RandomAccessDisk
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