Write docs for iced_winit::Clipboard

Also explicitly allow the missing debug implementation.
This commit is contained in:
Héctor Ramón Jiménez 2020-02-04 03:58:40 +01:00
parent 98f20e4cc1
commit 9a875864cf

View File

@ -1,6 +1,12 @@
/// A buffer for short-term storage and transfer within and between
/// applications.
#[allow(missing_debug_implementations)]
pub struct Clipboard(window_clipboard::Clipboard);
impl Clipboard {
/// Creates a new [`Clipboard`] for the given window.
///
/// [`Clipboard`]: struct.Clipboard.html
pub fn new(window: &winit::window::Window) -> Option<Clipboard> {
window_clipboard::Clipboard::new(window).map(Clipboard).ok()
}