diff options
author | 2021-03-11 03:49:45 +0100 | |
---|---|---|
committer | 2021-03-11 03:52:41 +0100 | |
commit | 7da3fb1b2225732c87aebb13a067fbdb30b0cf2d (patch) | |
tree | 602a967f936bc9887f281143c63ec3d49b35fcc1 /web/src/clipboard.rs | |
parent | a365998264420b1dac26a0de8e50ad4a33900885 (diff) | |
download | iced-7da3fb1b2225732c87aebb13a067fbdb30b0cf2d.tar.gz iced-7da3fb1b2225732c87aebb13a067fbdb30b0cf2d.tar.bz2 iced-7da3fb1b2225732c87aebb13a067fbdb30b0cf2d.zip |
Implement stub `Clipboard` in `iced_web`
We need to figure out browser permissions and use of unstable `web-sys`
APIs
Diffstat (limited to 'web/src/clipboard.rs')
-rw-r--r-- | web/src/clipboard.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/web/src/clipboard.rs b/web/src/clipboard.rs new file mode 100644 index 00000000..167a1e53 --- /dev/null +++ b/web/src/clipboard.rs @@ -0,0 +1,21 @@ +/// A buffer for short-term storage and transfer within and between +/// applications. +#[derive(Debug, Clone, Copy)] +pub struct Clipboard; + +impl Clipboard { + /// Creates a new [`Clipboard`]. + pub fn new() -> Self { + Self + } + + /// Reads the current content of the [`Clipboard`] as text. + pub fn read(&self) -> Option<String> { + unimplemented! {} + } + + /// Writes the given text contents to the [`Clipboard`]. + pub fn write(&mut self, _contents: String) { + unimplemented! {} + } +} |