clipin 0.9.2

A Rust library to get text from clipboard or stdin
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[cfg(all(feature = "async", feature = "sync"))]
compile_error!("features \"async\" and \"sync\" are mutually exclusive; enable exactly one.");

#[cfg(not(any(feature = "async", feature = "sync")))]
compile_error!("enable a feature: cargo run --example basic --features async|sync");

#[cfg(feature = "async")]
#[tokio::main]
async fn main() {
    let (text, _clipboard) = clipin::get().await.unwrap();
    println!("{text}");
}

#[cfg(feature = "sync")]
fn main() {
    let (text, _clipboard) = clipin::get().unwrap();
    println!("{text}");
}