cosmic-cinder 0.1.12

Rust terminal UI for Phoenix perpetuals on Solana
Documentation
1
2
3
4
5
6
7
8
//! Clipboard helper used by modal actions.

/// Writes `text` to the OS clipboard. Returns a short error string on failure
/// (e.g. no display server) — callers surface it in the status line.
pub(in crate::tui::runtime) fn copy_to_clipboard(text: &str) -> Result<(), String> {
    let mut cb = arboard::Clipboard::new().map_err(|e| e.to_string())?;
    cb.set_text(text.to_string()).map_err(|e| e.to_string())
}