Clipboard
The clipboard module provides task-based operations for reading from and writing to the system clipboard.Reading from Clipboard
Read any content type
Kind of Content from the clipboard.
Read text
Read HTML
Read files
Read image
image feature).
Writing to Clipboard
Content to the clipboard.
Types
Content
String→Content::TextImage→Content::Image(withimagefeature)Vec<PathBuf>→Content::Files
Kind
Image
Error
- ClipboardUnavailable - Clipboard is not present or cannot be accessed
- ClipboardOccupied - Native clipboard is held by another party
- ContentNotAvailable - Clipboard contents not available in requested format
- ConversionFailure - Content could not be converted to appropriate format
- Unknown - Any other error
Examples
Reading text
Writing text
Reading files
Reading images (with feature)
Platform Support
Clipboard operations are supported on most platforms, but some features may have platform-specific limitations:- Windows/Linux/macOS: Full support for all content types
- Web: Text and HTML support (file operations may be limited)
- Wayland: Full support with clipboard protocols
See Also
- Task - For understanding task execution
