clipin
A Rust library to get text from clipboard or stdin.
Usage
Enable exactly one feature: async or sync. Returns text and optionally the clipboard instance if available.
Async
async
Sync
License
MIT. See LICENSE for details.
A Rust library to get text from clipboard or stdin.
Enable exactly one feature: async or sync. Returns text and optionally the clipboard instance if available.
cargo add clipin --features async
#[tokio::main]
async fn main() {
let (text, clipboard) = clipin::get().await.unwrap();
println!("{text}");
}
cargo add clipin --features sync
fn main() {
let (text, clipboard) = clipin::get().unwrap();
println!("{text}");
}
MIT. See LICENSE for details.