copypasta 0.10.2

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

fn main() {
    let mut ctx = ClipboardContext::new().unwrap();

    let msg = "Hello, world!";
    ctx.set_contents(msg.to_owned()).unwrap();

    let content = ctx.get_contents().unwrap();

    println!("{}", content);
}