docs: Add missing rustdoc for StatusService struct and methods
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
This commit is contained in:
@@ -7,13 +7,52 @@ use clap::Command;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
|
||||
/// Service for generating system status information.
|
||||
///
|
||||
/// This service collects and formats status data about the application's
|
||||
/// configuration, storage paths, compression engines, metadata plugins,
|
||||
/// and filter plugins. It provides a unified interface for status reporting
|
||||
/// used by both CLI and server modes.
|
||||
pub struct StatusService;
|
||||
|
||||
impl StatusService {
|
||||
/// Creates a new `StatusService` instance.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// A new `StatusService` instance.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// let service = StatusService::new();
|
||||
/// ```
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
|
||||
/// Generates comprehensive status information for the application.
|
||||
///
|
||||
/// Collects data about paths, compression engines, available and configured
|
||||
/// meta plugins, and filter plugins. Uses the provided settings to determine
|
||||
/// enabled components.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `cmd` - Mutable reference to the Clap command for error reporting.
|
||||
/// * `settings` - Application settings containing configuration.
|
||||
/// * `data_path` - Path to the data storage directory.
|
||||
/// * `db_path` - Path to the SQLite database file.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// `StatusInfo` - Structured status information.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// let status = service.generate_status(&mut cmd, &settings, data_path, db_path);
|
||||
/// ```
|
||||
pub fn generate_status(
|
||||
&self,
|
||||
cmd: &mut Command,
|
||||
@@ -56,10 +95,14 @@ impl StatusService {
|
||||
|
||||
status_info
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl Default for StatusService {
|
||||
/// Returns the default `StatusService` instance.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// A new `StatusService`.
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user