2019-12-18 07:45:49 +01:00
|
|
|
/// A buffer for short-term storage and transfer within and between
|
|
|
|
|
/// applications.
|
|
|
|
|
pub trait Clipboard {
|
2021-03-10 01:16:26 +01:00
|
|
|
/// Reads the current content of the [`Clipboard`] as text.
|
|
|
|
|
fn read(&self) -> Option<String>;
|
2021-03-10 01:18:22 +01:00
|
|
|
|
|
|
|
|
/// Writes the given text contents to the [`Clipboard`].
|
|
|
|
|
fn write(&mut self, contents: String);
|
2019-12-18 07:45:49 +01:00
|
|
|
}
|