Struct disk::zstd::AsyncZstdDisk
source · pub struct AsyncZstdDisk {
inner: IoSource<File>,
seek_table: ZstdSeekTable,
}
Fields§
§inner: IoSource<File>
§seek_table: ZstdSeekTable
Trait Implementations§
source§impl AsyncDisk for AsyncZstdDisk
impl AsyncDisk for AsyncZstdDisk
source§fn read_to_mem<'a, 'async_trait>(
&'a self,
file_offset: u64,
mem: Arc<dyn BackingMemory + Send + Sync>,
mem_offsets: MemRegionIter<'a>
) -> Pin<Box<dyn Future<Output = DiskResult<usize>> + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn read_to_mem<'a, 'async_trait>(
&'a self,
file_offset: u64,
mem: Arc<dyn BackingMemory + Send + Sync>,
mem_offsets: MemRegionIter<'a>
) -> Pin<Box<dyn Future<Output = DiskResult<usize>> + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Reads data from file_offset
of decompressed disk image till the end of current
zstd frame and write them into memory mem
at mem_offsets
. This function should
function the same as running preadv()
on decompressed zstd image and reading into
the array of iovec
s specified with mem
and mem_offsets
.
source§fn flush<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = DiskResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = DiskResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Flush intermediary buffers and/or dirty state to file. fsync not required.
source§fn fsync<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = DiskResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fsync<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = DiskResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Asynchronously fsyncs any completed operations to the disk.
source§fn fdatasync<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = DiskResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fdatasync<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = DiskResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Asynchronously fdatasyncs any completed operations to the disk.
Note that an implementation may simply call fsync for fdatasync.
source§fn write_from_mem<'a, 'async_trait>(
&'a self,
_file_offset: u64,
_mem: Arc<dyn BackingMemory + Send + Sync>,
_mem_offsets: MemRegionIter<'a>
) -> Pin<Box<dyn Future<Output = DiskResult<usize>> + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn write_from_mem<'a, 'async_trait>(
&'a self,
_file_offset: u64,
_mem: Arc<dyn BackingMemory + Send + Sync>,
_mem_offsets: MemRegionIter<'a>
) -> Pin<Box<dyn Future<Output = DiskResult<usize>> + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Writes to the file at ‘file_offset’ from memory
mem
at mem_offsets
.source§fn punch_hole<'life0, 'async_trait>(
&'life0 self,
_file_offset: u64,
_length: u64
) -> Pin<Box<dyn Future<Output = DiskResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn punch_hole<'life0, 'async_trait>(
&'life0 self,
_file_offset: u64,
_length: u64
) -> Pin<Box<dyn Future<Output = DiskResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Replaces a range of bytes with a hole.
source§fn write_zeroes_at<'life0, 'async_trait>(
&'life0 self,
_file_offset: u64,
_length: u64
) -> Pin<Box<dyn Future<Output = DiskResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_zeroes_at<'life0, 'async_trait>(
&'life0 self,
_file_offset: u64,
_length: u64
) -> Pin<Box<dyn Future<Output = DiskResult<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Writes up to
length
bytes of zeroes to the stream, returning how many bytes were written.source§fn read_double_buffered<'life0, 'life1, 'async_trait>(
&'life0 self,
file_offset: u64,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<usize>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_double_buffered<'life0, 'life1, 'async_trait>(
&'life0 self,
file_offset: u64,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<usize>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reads from the file at ‘file_offset’ into
buf
. Read moresource§fn write_double_buffered<'life0, 'life1, 'async_trait>(
&'life0 self,
file_offset: u64,
buf: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<usize>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_double_buffered<'life0, 'life1, 'async_trait>(
&'life0 self,
file_offset: u64,
buf: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<usize>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Writes to the file at ‘file_offset’ from
buf
. Read moresource§impl DiskGetLen for AsyncZstdDisk
impl DiskGetLen for AsyncZstdDisk
source§impl FileAllocate for AsyncZstdDisk
impl FileAllocate for AsyncZstdDisk
Auto Trait Implementations§
impl !RefUnwindSafe for AsyncZstdDisk
impl Send for AsyncZstdDisk
impl Sync for AsyncZstdDisk
impl Unpin for AsyncZstdDisk
impl !UnwindSafe for AsyncZstdDisk
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