diff --git a/native/src/debug/null.rs b/native/src/debug/null.rs index 2a9430cd..60e6122d 100644 --- a/native/src/debug/null.rs +++ b/native/src/debug/null.rs @@ -1,3 +1,4 @@ +#![allow(missing_docs)] #[derive(Debug)] pub struct Debug; diff --git a/winit/src/application.rs b/winit/src/application.rs index fcba47b3..df6e4eec 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -1,3 +1,4 @@ +//! Create interactive, native cross-platform applications. use crate::{ conversion, mouse, Clipboard, Command, Debug, Executor, Mode, Proxy, Runtime, Settings, Size, Subscription, @@ -72,6 +73,10 @@ pub trait Application: Program { } } +/// Runs an [`Application`] with an executor, compositor, and the provided +/// settings. +/// +/// [`Application`]: trait.Application.html pub fn run( settings: Settings, compositor_settings: C::Settings, @@ -254,6 +259,8 @@ pub fn run( }) } +/// Handles a `WindowEvent` and mutates the provided control flow, keyboard +/// modifiers, viewport, and resized flag accordingly. pub fn handle_window_event( event: &winit::event::WindowEvent<'_>, window: &winit::window::Window, diff --git a/winit/src/lib.rs b/winit/src/lib.rs index d3af9ae9..bdab3ed7 100644 --- a/winit/src/lib.rs +++ b/winit/src/lib.rs @@ -15,7 +15,7 @@ //! [`winit`]: https://github.com/rust-windowing/winit //! [`Application`]: trait.Application.html //! [`conversion`]: conversion -//#![deny(missing_docs)] +#![deny(missing_docs)] #![deny(missing_debug_implementations)] #![deny(unused_results)] #![forbid(unsafe_code)] diff --git a/winit/src/proxy.rs b/winit/src/proxy.rs index ee96614a..532f8c56 100644 --- a/winit/src/proxy.rs +++ b/winit/src/proxy.rs @@ -5,6 +5,7 @@ use iced_native::futures::{ }; use std::pin::Pin; +/// An event loop proxy that implements `Sink`. #[derive(Debug)] pub struct Proxy { raw: winit::event_loop::EventLoopProxy, @@ -19,6 +20,9 @@ impl Clone for Proxy { } impl Proxy { + /// Creates a new [`Proxy`] from an `EventLoopProxy`. + /// + /// [`Proxy`]: struct.Proxy.html pub fn new(raw: winit::event_loop::EventLoopProxy) -> Self { Self { raw } } diff --git a/winit/src/settings.rs b/winit/src/settings.rs index 751f5071..37cb832f 100644 --- a/winit/src/settings.rs +++ b/winit/src/settings.rs @@ -44,6 +44,7 @@ pub struct Window { } impl Window { + /// Converts the window settings into a `WindowBuilder` from `winit`. pub fn into_builder( self, title: &str,