write_read/
write_read.rs

1//! run with
2//!     cargo run --example write_read
3
4fn main() {
5    println!("Clipboard backend type: {:?}", terminal_clipboard::get_type());
6    println!(
7        "Initial content of the clipboard: {:?}",
8        terminal_clipboard::get_string().unwrap(),
9    );
10    let s = "TEST";
11    println!("Writing {:?} in the clipboard", s);
12    terminal_clipboard::set_string(s).unwrap();
13    println!(
14        "New content of the clipboard: {:?}",
15        terminal_clipboard::get_string().unwrap(),
16    );
17}