pub struct MemoryFileInternal { /* private fields */ }
Implementations§
Source§impl MemoryFileInternal
impl MemoryFileInternal
pub fn create_new( path: impl AsRef<Path>, memory_mode: MemoryFileMode, ) -> Arc<RwLock<Self>>
pub fn create_from_fs(path: impl AsRef<Path>) -> Option<Arc<RwLock<Self>>>
pub fn debug_dump_files()
pub fn is_on_disk(&self) -> bool
pub fn is_memory_preferred(&self) -> bool
pub fn get_chunk(&self, index: usize) -> Arc<RwLock<FileChunk>>
pub fn get_chunks_count(&self) -> usize
pub fn retrieve_reference(path: impl AsRef<Path>) -> Option<Arc<RwLock<Self>>>
pub fn active_files_count() -> usize
pub fn delete(path: impl AsRef<Path>, remove_fs: bool) -> bool
pub fn delete_directory(dir: impl AsRef<Path>, remove_fs: bool) -> bool
pub fn open(&mut self, mode: OpenMode) -> Result<(), String>
pub fn close(&mut self)
pub fn reserve_space( self_: &Arc<RwLock<Self>>, last_chunk: AllocatedChunk, out_chunks: &mut Vec<(Option<ArcRwLockReadGuard<RawRwLock, FileChunk>>, &mut [u8])>, size: usize, el_size: usize, ) -> AllocatedChunk
pub fn get_underlying_file(&self) -> &UnderlyingFile
pub fn add_chunk(self_: &Arc<RwLock<Self>>, chunk: AllocatedChunk)
pub fn flush_chunks(&mut self, limit: usize) -> usize
pub fn flush_pending_chunks_count(&self) -> usize
pub fn has_flush_pending_chunks(&self) -> bool
pub fn change_to_disk_only(&mut self)
pub fn has_only_one_chunk(&self) -> bool
pub fn get_path(&self) -> &Path
pub fn len(&self) -> usize
Trait Implementations§
impl Send for MemoryFileInternal
impl Sync for MemoryFileInternal
Auto Trait Implementations§
impl !Freeze for MemoryFileInternal
impl !RefUnwindSafe for MemoryFileInternal
impl Unpin for MemoryFileInternal
impl !UnwindSafe for MemoryFileInternal
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more