docs: Improve Rustdoc for compression engine, delete mode, and parser modules
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
This commit is contained in:
@@ -10,6 +10,11 @@ use rusqlite::Connection;
|
||||
|
||||
/// Handles the delete mode: removes items by ID from the database and storage.
|
||||
///
|
||||
/// This function processes a list of item IDs, attempting to delete each from
|
||||
/// both the database and the underlying file storage. It skips items that are
|
||||
/// not found and logs warnings for them. Validation of arguments (e.g., ensuring
|
||||
/// IDs are provided and tags are empty) is handled at the clap parsing level.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `_cmd` - Clap command for error handling (unused).
|
||||
@@ -22,7 +27,23 @@ use rusqlite::Connection;
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// `Result<()>` on success, or an error if deletion fails.
|
||||
/// `Result<()>` on success, or an error if deletion fails for any item.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// Returns an `anyhow::Error` if a deletion operation fails due to database
|
||||
/// or I/O issues (excluding `ItemNotFound`, which is handled gracefully).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// // This would be called from main after parsing args
|
||||
/// mode_delete(&mut cmd, &settings, &config, &mut vec![1, 2], &mut vec![], &mut conn, data_path)?;
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// None.
|
||||
pub fn mode_delete(
|
||||
_cmd: &mut Command,
|
||||
_settings: &config::Settings,
|
||||
|
||||
Reference in New Issue
Block a user