cli-clipboard 0.4.0

cli-clipboard is a cross-platform library for getting and setting the contents of the OS-level clipboard.
Documentation
1
2
3
4
5
6
7
use cli_clipboard::{ClipboardContext, ClipboardProvider};

fn main() {
    let mut ctx = ClipboardContext::new().unwrap();
    let the_string = "Hello, world!";
    ctx.set_contents(the_string.to_owned()).unwrap();
}