pub struct Config {
pub block_size: u32,
pub block_count: u32,
pub read_size: u32,
pub prog_size: u32,
pub block_cycles: i32,
pub cache_size: u32,
pub lookahead_size: u32,
pub name_max: u32,
pub file_max: u32,
pub attr_max: u32,
}Expand description
Filesystem configuration.
Only block_size and block_count are required; the rest have sensible
defaults. Create with Config::new and override fields as needed.
Fields§
§block_size: u32Size of an erasable block in bytes.
block_count: u32Number of erasable blocks on the device.
read_size: u32Minimum read size in bytes. Defaults to 16.
prog_size: u32Minimum program (write) size in bytes. Defaults to 16.
block_cycles: i32Number of erase cycles before moving data to a new block.
Set to -1 to disable wear leveling.
cache_size: u32Size of per-file caches in bytes. 0 (default) uses block_size.
lookahead_size: u32Size of the block allocator lookahead buffer in bytes.
0 (default) uses block_size. Must be a multiple of 8.
name_max: u32Maximum file name length in bytes. Defaults to 255.
file_max: u32Maximum file size in bytes.
attr_max: u32Maximum size of custom attributes in bytes.
Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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