pub struct FileOperations {}Implementations§
Source§impl FileOperations
impl FileOperations
pub async fn open_path( data_dir: &Path, page_id: &PageId, file_number: usize, ) -> Result<File, FileOperationsError>
Sourcepub async fn add_chunk(
file: &mut File,
page_offset: &PageOffset,
buffer: Bytes,
) -> Result<(), FileOperationsError>
pub async fn add_chunk( file: &mut File, page_offset: &PageOffset, buffer: Bytes, ) -> Result<(), FileOperationsError>
Note the File Handle AND PageOffset should point to where the add should occur If the file is larger than requested nothing is done.
pub async fn make_sub_path( data_dir: &Path, page_id: &PageId, ) -> Result<PathBuf, FileOperationsError>
pub async fn read_chunk( file: &mut File, page_offset: &PageOffset, ) -> Result<Bytes, FileOperationsError>
pub async fn update_chunk( file: &mut File, page_offset: &PageOffset, buffer: Bytes, ) -> Result<(), FileOperationsError>
Auto Trait Implementations§
impl Freeze for FileOperations
impl RefUnwindSafe for FileOperations
impl Send for FileOperations
impl Sync for FileOperations
impl Unpin for FileOperations
impl UnsafeUnpin for FileOperations
impl UnwindSafe for FileOperations
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