Function wl_clipboard_rs::copy::copy

source ·
pub fn copy(
    options: Options,
    source: Source,
    mime_type: MimeType
) -> Result<(), Error>
Expand description

Copies data to the clipboard.

The data is copied from source and offered in the mime_type MIME type. See Options for customizing the behavior of this operation.

Examples

use wl_clipboard_rs::copy::{copy, MimeType, Options, Source};

let opts = Options::new();
copy(opts, Source::Bytes([1, 2, 3][..].into()), MimeType::Autodetect)?;