pub struct ZstdDisk {
file: File,
seek_table: ZstdSeekTable,
}
Fields§
§file: File
§seek_table: ZstdSeekTable
Implementations§
Trait Implementations§
source§impl AsRawDescriptor for ZstdDisk
impl AsRawDescriptor for ZstdDisk
source§fn as_raw_descriptor(&self) -> RawDescriptor
fn as_raw_descriptor(&self) -> RawDescriptor
Returns the underlying raw descriptor. Read more
source§impl DiskGetLen for ZstdDisk
impl DiskGetLen for ZstdDisk
source§impl FileReadWriteAtVolatile for ZstdDisk
impl FileReadWriteAtVolatile for ZstdDisk
source§fn read_at_volatile(
&self,
slice: VolatileSlice<'_>,
offset: u64
) -> Result<usize>
fn read_at_volatile( &self, slice: VolatileSlice<'_>, offset: u64 ) -> Result<usize>
Reads bytes from this file at
offset
into the given slice, returning the number of bytes
read on success. On Windows file pointer will update with the read, but on Linux the
file pointer will not change.source§fn write_at_volatile(
&self,
_slice: VolatileSlice<'_>,
_offset: u64
) -> Result<usize>
fn write_at_volatile( &self, _slice: VolatileSlice<'_>, _offset: u64 ) -> Result<usize>
Writes bytes to this file at
offset
from the given slice, returning the number of bytes
written on success. On Windows file pointer will update with the write, but on Linux the
file pointer will not change.§fn read_vectored_at_volatile(
&self,
bufs: &[VolatileSlice<'_>],
offset: u64
) -> Result<usize, Error>
fn read_vectored_at_volatile( &self, bufs: &[VolatileSlice<'_>], offset: u64 ) -> Result<usize, Error>
Like
read_at_volatile
, except it reads to a slice of buffers. Data is copied to fill each
buffer in order, with the final buffer written to possibly being only partially filled. This
method must behave as a single call to read_at_volatile
with the buffers concatenated
would. The default implementation calls read_at_volatile
with either the first nonempty
buffer provided, or returns Ok(0)
if none exists.
On Windows file pointer will update with the read, but on Linux the file pointer will not
change.§fn read_exact_at_volatile(
&self,
slice: VolatileSlice<'_>,
offset: u64
) -> Result<(), Error>
fn read_exact_at_volatile( &self, slice: VolatileSlice<'_>, offset: u64 ) -> Result<(), Error>
Reads bytes from this file at
offset
into the given slice until all bytes in the slice are
read, or an error is returned. On Windows file pointer will update with the read, but on
Linux the file pointer will not change.§fn write_vectored_at_volatile(
&self,
bufs: &[VolatileSlice<'_>],
offset: u64
) -> Result<usize, Error>
fn write_vectored_at_volatile( &self, bufs: &[VolatileSlice<'_>], offset: u64 ) -> Result<usize, Error>
Like
write_at_volatile
, except that it writes from a slice of buffers. Data is copied
from each buffer in order, with the final buffer read from possibly being only partially
consumed. This method must behave as a call to write_at_volatile
with the buffers
concatenated would. The default implementation calls write_at_volatile
with either the
first nonempty buffer provided, or returns Ok(0)
if none exists.
On Windows file pointer will update with the write, but on Linux the file pointer will not
change.§fn write_all_at_volatile(
&self,
slice: VolatileSlice<'_>,
offset: u64
) -> Result<(), Error>
fn write_all_at_volatile( &self, slice: VolatileSlice<'_>, offset: u64 ) -> Result<(), Error>
Writes bytes to this file at
offset
from the given slice until all bytes in the slice
are written, or an error is returned. On Windows file pointer will update with the write,
but on Linux the file pointer will not change.source§impl ToAsyncDisk for ZstdDisk
impl ToAsyncDisk for ZstdDisk
source§fn to_async_disk(
self: Box<Self>,
ex: &Executor
) -> DiskResult<Box<dyn AsyncDisk>>
fn to_async_disk( self: Box<Self>, ex: &Executor ) -> DiskResult<Box<dyn AsyncDisk>>
Convert a boxed self in to a box-wrapped implementaiton of AsyncDisk.
Used to convert a standard disk image to an async disk image. This conversion and the
inverse are needed so that the
Send
DiskImage can be given to the block thread where it is
converted to a non-Send
AsyncDisk. The AsyncDisk can then be converted back and returned
to the main device thread if the block device is destroyed or reset.Auto Trait Implementations§
impl RefUnwindSafe for ZstdDisk
impl Send for ZstdDisk
impl Sync for ZstdDisk
impl Unpin for ZstdDisk
impl UnwindSafe for ZstdDisk
Blanket Implementations§
§impl<T> AsRawDescriptors for Twhere
T: AsRawDescriptor,
impl<T> AsRawDescriptors for Twhere
T: AsRawDescriptor,
§fn as_raw_descriptors(&self) -> Vec<i32>
fn as_raw_descriptors(&self) -> Vec<i32>
Returns the underlying raw descriptors. Read more
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