docs: Add rustdoc for filter_plugin, binary_detection, and lib.rs
Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
This commit is contained in:
37
src/lib.rs
37
src/lib.rs
@@ -2,6 +2,32 @@
|
||||
#![deny(unsafe_code)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
//! Keep library for managing temporary files with compression and metadata.
|
||||
//!
|
||||
//! This library provides core functionality for the Keep application, including
|
||||
//! database operations, compression engines, item services, and plugin systems
|
||||
//! for metadata and filtering. It supports CLI modes, server APIs, and plugin
|
||||
//! registration via ctors.
|
||||
//!
|
||||
//! # Usage
|
||||
//!
|
||||
//! Add to Cargo.toml and use re-exported types:
|
||||
//! ```toml
|
||||
//! [dependencies]
|
||||
//! keep = "0.1"
|
||||
//! ```
|
||||
//!
|
||||
//! ```rust
|
||||
//! use keep::Args;
|
||||
//! let args = Args::parse();
|
||||
//! ```
|
||||
//!
|
||||
//! # Features
|
||||
//!
|
||||
//! - `server`: Enables Axum-based HTTP server.
|
||||
//! - `gzip`, `lz4`: Built-in compression support.
|
||||
//! - `magic`: File type detection via libmagic.
|
||||
|
||||
// Re-export modules for testing
|
||||
pub mod common;
|
||||
pub mod compression_engine;
|
||||
@@ -39,7 +65,16 @@ use meta_plugin::{
|
||||
#[allow(unused_imports)]
|
||||
use meta_plugin::magic_file;
|
||||
|
||||
// Initialize plugins at library load time
|
||||
/// Initializes plugins at library load time.
|
||||
///
|
||||
/// Ensures all filter and meta plugins are registered via their ctors.
|
||||
/// Call this early in application startup if needed (though ctors handle most cases).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// keep::init_plugins();
|
||||
/// ```
|
||||
pub fn init_plugins() {
|
||||
// This will be expanded in Step 3 implementation
|
||||
// For now, the ctors handle registration
|
||||
|
||||
Reference in New Issue
Block a user