pub trait DirectBlockDevice: DirectBaseOperations + MountOperations {
// Provided methods
fn get_block_size(&self) -> Result<u32> { ... }
fn get_block_count(&self) -> Result<Size> { ... }
fn erase(&self, position: Size, size: Size) -> Result<()> { ... }
}Provided Methods§
fn get_block_size(&self) -> Result<u32>
fn get_block_count(&self) -> Result<Size>
Sourcefn erase(&self, position: Size, size: Size) -> Result<()>
fn erase(&self, position: Size, size: Size) -> Result<()>
Prepare a byte range for writing, as raw flash requires before programming.
The range reads back unspecified data afterwards, and any write to it then
succeeds. Devices that can rewrite in place need not implement ERASE:
callers treat IoErrorKind::Unsupported as “nothing to do”.