Write documentation for new iced_winit API

This commit is contained in:
Héctor Ramón Jiménez 2020-05-28 02:49:32 +02:00
parent 508128436c
commit ef28347f1c
5 changed files with 14 additions and 1 deletions

View file

@ -5,6 +5,7 @@ use iced_native::futures::{
};
use std::pin::Pin;
/// An event loop proxy that implements `Sink`.
#[derive(Debug)]
pub struct Proxy<Message: 'static> {
raw: winit::event_loop::EventLoopProxy<Message>,
@ -19,6 +20,9 @@ impl<Message: 'static> Clone for Proxy<Message> {
}
impl<Message: 'static> Proxy<Message> {
/// Creates a new [`Proxy`] from an `EventLoopProxy`.
///
/// [`Proxy`]: struct.Proxy.html
pub fn new(raw: winit::event_loop::EventLoopProxy<Message>) -> Self {
Self { raw }
}