sabiql 1.8.0

A fast, driver-less TUI for browsing and editing PostgreSQL databases
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::app::ports::ClipboardWriter;

pub struct ArboardClipboard;

impl ClipboardWriter for ArboardClipboard {
    fn copy_text(&self, content: &str) -> Result<(), String> {
        arboard::Clipboard::new()
            .and_then(|mut cb| cb.set_text(content))
            .map_err(|e| e.to_string())
    }
}