Registry / utility / copypasta

copypasta

JSON →
library0.10.2rscratesunverified

Cross-platform library for getting and setting the contents of the OS-level clipboard.

# Cargo.toml [dependencies] copypasta = "0.10.2"
INSTALL
IMPORT
SIG · COPYPASTA
C
copypasta
utilityrustv0.10.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ClipboardContext
use copypasta::ClipboardContext;

Reading the current clipboard content.

use copypasta::{ClipboardContext, ClipboardProvider}; fn main() -> Result<(), Box<dyn std::error::Error>> { let mut ctx = ClipboardContext::new()?; let content = ctx.get_contents()?; println!("Clipboard: {}", content); Ok(()) }
Debug
Known issues
gotchaOn Linux, requires x11 or wayland feature flags; default may not work on all environments.
fix
Add features = ["x11"] or features = ["wayland"] to your Cargo.toml dependency.
affects: >=0.10.0
Upgrade
Version history
0.10.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
copypasta — cargo add copypasta · libregistry