Crates.io | copyrs |
lib.rs | copyrs |
version | 0.5.2 |
source | src |
created_at | 2024-04-07 13:22:58.006761 |
updated_at | 2024-04-19 09:20:45.360575 |
description | Crossplatform clipboard access |
homepage | |
repository | https://github.com/Vildanio/copyrs |
max_upload_size | |
id | 1199144 |
size | 31,573 |
Copyrs — is a tiny rust library, which provides crossplatform API for system clipboard.
It provides implementation for:
Please note that the library does not currently support:
use copyrs::{clipboard, Clipboard, ClipboardContentKind};
fn main() {
let mut clipboard = clipboard().unwrap();
let content = std::borrow::Cow::Borrowed("Hello, world!".as_bytes());
clipboard
.set_content(content, ClipboardContentKind::Text)
.unwrap();
let content = clipboard.get_content().unwrap();
println!("{0}", content);
}
The code is distributed under the MIT License, allowing for flexible usage and modification. Feel free to contribute to the project to improve its functionality and reliability across different platforms. Your contributions are valuable in making Copyrs a robust solution for handling clipboard operations in Rust.