diff options
author | Joe Wilm <joe@jwilm.com> | 2016-12-24 18:08:46 -0500 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-12-24 18:08:46 -0500 |
commit | 7cdf06e2be91159694d39697a41d58abb0e564e9 (patch) | |
tree | ae634cd160147c10a96598394447b73c282a3107 /copypasta/src/lib.rs | |
parent | 6e708d2119ce0c839a89858a42a6b124a5cf48f4 (diff) | |
download | r-alacritty-7cdf06e2be91159694d39697a41d58abb0e564e9.tar.gz r-alacritty-7cdf06e2be91159694d39697a41d58abb0e564e9.tar.bz2 r-alacritty-7cdf06e2be91159694d39697a41d58abb0e564e9.zip |
Implement copypasta::Store for macOS pasteboard
Only works with strings, currently.
Diffstat (limited to 'copypasta/src/lib.rs')
-rw-r--r-- | copypasta/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/copypasta/src/lib.rs b/copypasta/src/lib.rs index 9fe354f6..b498e2e9 100644 --- a/copypasta/src/lib.rs +++ b/copypasta/src/lib.rs @@ -32,10 +32,12 @@ pub trait Load : Sized { /// order to load the contents from other applications. pub trait Store : Load { /// Sets the primary clipboard contents - fn store_primary(&mut self, contents: String) -> Result<(), Self::Err>; + fn store_primary<S>(&mut self, contents: S) -> Result<(), Self::Err> + where S: Into<String>; /// Sets the secondary clipboard contents - fn store_selection(&mut self, contents: String) -> Result<(), Self::Err>; + fn store_selection<S>(&mut self, contents: S) -> Result<(), Self::Err> + where S: Into<String>; } #[cfg(target_os = "linux")] |