pub struct BufferOptions {
pub word_size: usize,
pub page_size: usize,
pub max_word_writes: usize,
pub max_page_erases: usize,
pub strict_mode: bool,
}Expand description
Options of a buffer storage.
Fields§
§word_size: usizeSize of a word in bytes.
page_size: usizeSize of a page in bytes.
max_word_writes: usizeHow many times a word can be written between page erase cycles.
max_page_erases: usizeHow many times a page can be erased.
strict_mode: boolWhether the storage should check the flash invariant.
When set, the following conditions would panic:
- A bit is written from 0 to 1.
- A word is written more than
Self::max_word_writes. - A page is erased more than
Self::max_page_erases.
Trait Implementations§
Source§impl Clone for BufferOptions
impl Clone for BufferOptions
Source§fn clone(&self) -> BufferOptions
fn clone(&self) -> BufferOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BufferOptions
impl RefUnwindSafe for BufferOptions
impl Send for BufferOptions
impl Sync for BufferOptions
impl Unpin for BufferOptions
impl UnsafeUnpin for BufferOptions
impl UnwindSafe for BufferOptions
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