arboard 3.6.1

Image and text handling for the OS clipboard.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use arboard::Clipboard;

fn main() {
	env_logger::init();
	let mut clipboard = Clipboard::new().unwrap();
	println!("Clipboard text was: {:?}", clipboard.get_text());

	let the_string = "Hello, world!";
	clipboard.set_text(the_string).unwrap();
	println!("But now the clipboard text should be: \"{the_string}\"");
}