Crate freya_clipboard

Crate freya_clipboard 

Source
Expand description

Clipboard utilities to read and write the system clipboard.

This crate wraps [copypasta] and exposes a small, ergonomic API to access the clipboard from Freya applications and tests. See Clipboard in clipboard.rs for usage examples.

This crate is reexported in freya::clipboard.

§Examples

use freya::clipboard::Clipboard;

// Read the clipboard content
if let Ok(text) = Clipboard::get() {
    println!("clipboard: {}", text);
}

// Write to the clipboard
let _ = Clipboard::set("Hello, Freya!".to_string());

Re-exports§

pub use copypasta;

Modules§

clipboard
Provides a clipboard abstraction to access the target system’s clipboard.
prelude