Skip to main content

try_clipboard_copy

Function try_clipboard_copy 

pub fn try_clipboard_copy(text: &str) -> bool
Expand description

Copy text only if a system clipboard backend accepts it.

Returns false on failure and never retains the text in an in-process buffer. Use this for secrets and success messages that require an actual clipboard write rather than an editor-local copy.