arboard 3.4.1

Image and text handling for the OS clipboard.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use arboard::Clipboard;
use std::{thread, time::Duration};

fn main() {
	env_logger::init();
	let mut ctx = Clipboard::new().unwrap();

	let html = r#"<h1>Hello, World!</h1>
<b>Lorem ipsum</b> dolor sit amet,<br>
<i>consectetur adipiscing elit</i>."#;

	let alt_text = r#"Hello, World!
Lorem ipsum dolor sit amet,
consectetur adipiscing elit."#;

	ctx.set_html(html, Some(alt_text)).unwrap();
	thread::sleep(Duration::from_secs(5));
}