rs-hop 0.2.0

Fuzzy-finder TUI to jump between git repositories and folders
Documentation
//! The repository port decoupling the service from concrete entry storage.
//!
//! The service depends on this trait; the TOML backend and the in-memory fake
//! implement it (DIP).

use crate::domain::error::Result;
use crate::domain::repo::Repo;

/// Reads and writes the managed entries (the `[[repos]]` array of config.toml).
pub trait RepoRepository {
    /// All entries in file order, with paths expanded and `kind` resolved.
    fn find_all(&self) -> Result<Vec<Repo>>;
    /// Persists the full entry list, preserving the settings block.
    fn save_all(&self, repos: &[Repo]) -> Result<()>;
    /// The ordered list of user section names (Files tab grouping).
    fn find_sections(&self) -> Result<Vec<String>>;
    /// Persists the ordered list of section names, preserving everything else.
    fn save_sections(&self, sections: &[String]) -> Result<()>;
}