Skip to main content

RepoMetadataRepository

Trait RepoMetadataRepository 

Source
pub trait RepoMetadataRepository {
    // Required methods
    fn get(&self, key: &str) -> Result<Option<String>, StorageError>;
    fn set(&self, key: &str, value: &str) -> Result<(), StorageError>;
    fn get_all(&self) -> Result<Vec<(String, String)>, StorageError>;
}
Expand description

Persistence operations for repo-level key-value metadata.

Stores lightweight metadata like project_name, last_scan_time, file_count, convention_count, etc.

Required Methods§

Source

fn get(&self, key: &str) -> Result<Option<String>, StorageError>

Get the value for a key. Returns None if the key does not exist.

Source

fn set(&self, key: &str, value: &str) -> Result<(), StorageError>

Set a key-value pair. Overwrites if the key already exists.

Source

fn get_all(&self) -> Result<Vec<(String, String)>, StorageError>

Get all key-value pairs, sorted by key.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§