modularize codebase

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69648ea836bfeb539450db14a666c623412e
This commit is contained in:
raf 2025-08-12 13:56:31 +03:00
commit b0820a1940
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
10 changed files with 445 additions and 252 deletions

12
src/commands/list.rs Normal file
View file

@ -0,0 +1,12 @@
use crate::db::{ClipboardDb, SledClipboardDb};
use std::io::Write;
pub trait ListCommand {
fn list(&self, out: impl Write, preview_width: u32);
}
impl ListCommand for SledClipboardDb {
fn list(&self, out: impl Write, preview_width: u32) {
self.list_entries(out, preview_width);
}
}