Update the documentation to use linking by name
See https://doc.rust-lang.org/stable/rustdoc/linking-to-items-by-name.html
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Flash storage abstraction.
|
||||
|
||||
/// Represents a byte position in a storage.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub struct StorageIndex {
|
||||
@@ -65,12 +67,14 @@ pub trait Storage {
|
||||
/// The following pre-conditions must hold:
|
||||
/// - The `index` must designate `value.len()` bytes in the storage.
|
||||
/// - Both `index` and `value.len()` must be word-aligned.
|
||||
/// - The written words should not have been written too many times since last page erasure.
|
||||
/// - The written words should not have been written [too many](Self::max_word_writes) times
|
||||
/// since the last page erasure.
|
||||
fn write_slice(&mut self, index: StorageIndex, value: &[u8]) -> StorageResult<()>;
|
||||
|
||||
/// Erases a page of the storage.
|
||||
///
|
||||
/// The `page` must be in the storage.
|
||||
/// The `page` must be in the storage, i.e. less than [`Storage::num_pages`]. And the page
|
||||
/// should not have been erased [too many](Self::max_page_erases) times.
|
||||
fn erase_page(&mut self, page: usize) -> StorageResult<()>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user