pub struct StorageLayout { /* private fields */ }Expand description
Calculated layout of flash regions
Implementations§
Source§impl StorageLayout
impl StorageLayout
Sourcepub fn new(capacity: usize, config: &StorageConfig) -> Result<Self>
pub fn new(capacity: usize, config: &StorageConfig) -> Result<Self>
Calculate layout for given capacity and config
Sourcepub fn metadata_address(&self) -> usize
pub fn metadata_address(&self) -> usize
Get metadata region address
Sourcepub fn journal_region(&self) -> Range<usize>
pub fn journal_region(&self) -> Range<usize>
Get journal region
Sourcepub fn slot_address(&self, slot: usize) -> usize
pub fn slot_address(&self, slot: usize) -> usize
Get slot start address
Trait Implementations§
Source§impl Clone for StorageLayout
impl Clone for StorageLayout
Source§fn clone(&self) -> StorageLayout
fn clone(&self) -> StorageLayout
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 StorageLayout
impl RefUnwindSafe for StorageLayout
impl Send for StorageLayout
impl Sync for StorageLayout
impl Unpin for StorageLayout
impl UnsafeUnpin for StorageLayout
impl UnwindSafe for StorageLayout
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