summaryrefslogtreecommitdiffstats
path: root/native/src/clipboard.rs
blob: fdb769da8eaba9f3def9af7756e3c13b9ea17d3b (plain) (blame)
1
2
3
4
5
6
7
8
9
/// A buffer for short-term storage and transfer within and between
/// applications.
pub trait Clipboard {
    /// Reads the current content of the [`Clipboard`] as text.
    fn read(&self) -> Option<String>;

    /// Writes the given text contents to the [`Clipboard`].
    fn write(&mut self, contents: String);
}