Skip to content

Commit

Permalink
array/storage further clarify erase behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
LDeakin committed Mar 2, 2024
1 parent 1fe8c47 commit 875298c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/array/array_sync_writable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ impl<TStorage: ?Sized + WritableStorageTraits + 'static> Array<TStorage> {

/// Erase the metadata.
///
/// Succeeds if the metadata does not exist.
///
/// # Errors
/// Returns a [`StorageError`] if there is an underlying store error.
pub fn erase_metadata(&self) -> Result<(), StorageError> {
Expand All @@ -155,6 +157,8 @@ impl<TStorage: ?Sized + WritableStorageTraits + 'static> Array<TStorage> {

/// Erase the chunk at `chunk_indices`.
///
/// Succeeds if the chunk does not exist.
///
/// # Errors
/// Returns a [`StorageError`] if there is an underlying store error.
pub fn erase_chunk(&self, chunk_indices: &[u64]) -> Result<(), StorageError> {
Expand Down
6 changes: 6 additions & 0 deletions src/storage/storage_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ pub fn retrieve_chunk(

/// Erase a chunk.
///
/// Succeeds if the chunk does not exist.
///
/// # Errors
/// Returns a [`StorageError`] if there is an underlying error with the store.
pub fn erase_chunk(
Expand All @@ -367,6 +369,8 @@ pub fn erase_chunk(

/// Erase metadata.
///
/// Succeeds if the metadata does not exist.
///
/// # Errors
/// Returns a [`StorageError`] if there is an underlying error with the store.
pub fn erase_metadata(
Expand Down Expand Up @@ -427,6 +431,8 @@ pub fn discover_nodes(storage: &dyn ListableStorageTraits) -> Result<StoreKeys,

/// Erase a node (group or array) and all of its children.
///
/// Succeeds if the node does not exist.
///
/// # Errors
/// Returns a [`StorageError`] if there is an underlying error with the store.
pub fn erase_node(
Expand Down

0 comments on commit 875298c

Please sign in to comment.