Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: improved documentation for remove_fully #78

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,15 @@ impl RemoveOpts {
}

/// Set the remove fully option
/// If remove_fully is set to true then the index file itself will be physically deleted rather than appending a null.
/// If remove_fully is set to true then the index and content file itself will be physically deleted rather than appending a null.
pub fn remove_fully(mut self, remove_fully: bool) -> Self {
self.remove_fully = remove_fully;
self
}

/// Removes an individual index metadata entry. The associated content will be left in the cache.
/// Removes an individual index metadata entry.
/// If remove_fully is set to false (default), the associated content will be left in the cache.
/// If remove_fully is true, both the index entry and the contents will be physically removed from the disk
pub fn remove_sync<P, K>(self, cache: P, key: K) -> Result<()>
where
P: AsRef<Path>,
Expand All @@ -419,7 +421,9 @@ impl RemoveOpts {
}
}

/// Removes an individual index metadata entry. The associated content will be left in the cache.
/// Removes an individual index metadata entry.
/// If remove_fully is set to false (default), the associated content will be left in the cache.
/// If remove_fully is true, both the index entry and the contents will be physically removed from the disk
#[cfg(any(feature = "async-std", feature = "tokio"))]
pub async fn remove<P, K>(self, cache: P, key: K) -> Result<()>
where
Expand Down
Loading