pub struct FFCfg {
pub mid: u8,
pub path: PathBuf,
pub chunk_size: usize,
pub initial_chunk_amount: usize,
}Expand description
Config for FrozenFile
Fields§
§mid: u8Module id used for error logging
path: PathBufPath for the file
NOTE: The caller must make sure that the parent directory exists
chunk_size: usizeSize (in bytes) of a single chunk on fs
A chunk is a smalled fixed size allocation and addressing unit used by
FrozenFile for all the write/read ops, which are operated by index
of the chunk and not the offset of the byte
initial_chunk_amount: usizeNumber of chunks to pre-allocate when FrozenFile is initialized
Initial file length will be chunk_size * initial_chunk_amount (bytes)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FFCfg
impl RefUnwindSafe for FFCfg
impl Send for FFCfg
impl Sync for FFCfg
impl Unpin for FFCfg
impl UnsafeUnpin for FFCfg
impl UnwindSafe for FFCfg
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