Add dummy platform 🌮
This commit is contained in:
parent
fc11e948eb
commit
0f74d59198
7 changed files with 106 additions and 16 deletions
12
dummy/Cargo.toml
Normal file
12
dummy/Cargo.toml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[package]
|
||||
name = "clipboard_dummy"
|
||||
version = "0.3.1"
|
||||
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
|
||||
edition = "2018"
|
||||
description = "A library to obtain access to the dummy clipboard"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/hecrj/window_clipboard"
|
||||
documentation = "https://docs.rs/clipboard_x11"
|
||||
keywords = ["clipboard", "dummy"]
|
||||
|
||||
[dependencies]
|
||||
7
dummy/LICENSE
Normal file
7
dummy/LICENSE
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Copyright (c) 2019 quininer@live.com, Héctor Ramón, window_clipboard_x11 contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
22
dummy/src/lib.rs
Normal file
22
dummy/src/lib.rs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#[forbid(unsafe_code)]
|
||||
use std::error::Error;
|
||||
|
||||
/// A connection to an Dummy [`Clipboard`].
|
||||
pub struct Clipboard;
|
||||
|
||||
impl Clipboard {
|
||||
/// Connect to the Dummy and obtain a [`Clipboard`].
|
||||
pub fn connect() -> Result<Self, Box<dyn Error>> {
|
||||
Ok(Clipboard)
|
||||
}
|
||||
|
||||
/// Read the current [`Clipboard`] value.
|
||||
pub fn read(&self) -> Result<String, Box<dyn Error>> {
|
||||
Ok(String::new())
|
||||
}
|
||||
|
||||
/// Write a new value to the [`Clipboard`].
|
||||
pub fn write(&mut self, contents: String) -> Result<(), Box<dyn Error>> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue