Function cli_clipboard::set_contents
source · Expand description
Write a string to the clipboard
This uses the platform default behavior for setting clipboard contents. Other users of the Wayland or X11 clipboard will only see the contents copied to the clipboard so long as the process copying to the clipboard exists. MacOS and Windows clipboard contents will stick around after your application exits.
Example
cli_clipboard::set_contents("testing".to_owned()).unwrap();
assert_eq!(cli_clipboard::get_contents().unwrap(), "testing");