buffer/buffer.rs
1use clipboard_rs::{Clipboard, ClipboardContext};
2
3fn main() {
4 let ctx = ClipboardContext::new().unwrap();
5 let types = ctx.available_formats().unwrap();
6 println!("{:?}", types);
7
8 let buffer = ctx.get_buffer("public.html").unwrap();
9
10 let string = String::from_utf8(buffer).unwrap();
11
12 println!("{}", string);
13}