pub struct Options {
pub cache_size: usize,
pub block_cycles: Option<u16>,
}Expand description
Mount and format options for FileSystem.
Fields§
§cache_size: usizeSize of the read and program caches in bytes.
block_cycles: Option<u16>Number of erase cycles before LittleFS evicts a metadata block for wear
levelling, or None for the LittleFS default (-1, wear levelling
disabled).
LittleFS recommends values in the range 100–1000. Flash-backed
devices should set this (for example, Some(500)), while RAM or
host-file storage can leave it unset.
Implementations§
Source§impl Options
impl Options
Sourcepub const fn new(cache_size: usize) -> Self
pub const fn new(cache_size: usize) -> Self
Creates options with cache_size and block_cycles unset (None).
Sourcepub const fn set_cache_size(self, cache_size: usize) -> Self
pub const fn set_cache_size(self, cache_size: usize) -> Self
Sets the read and program cache size in bytes.
Sourcepub const fn set_block_cycles(self, block_cycles: u16) -> Self
pub const fn set_block_cycles(self, block_cycles: u16) -> Self
Sets the metadata block wear-levelling cycle count.
Trait Implementations§
impl Copy for Options
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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