Document widget feature flags

This commit is contained in:
Héctor Ramón Jiménez 2020-04-05 04:38:10 +02:00
parent 070e8e70e4
commit 7479ba137f
2 changed files with 11 additions and 1 deletions

View File

@ -178,6 +178,7 @@
#![deny(unused_results)] #![deny(unused_results)]
#![forbid(unsafe_code)] #![forbid(unsafe_code)]
#![forbid(rust_2018_idioms)] #![forbid(rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg))]
mod application; mod application;
mod element; mod element;
mod sandbox; mod sandbox;

View File

@ -18,13 +18,22 @@
//! [`text_input::State`]: text_input/struct.State.html //! [`text_input::State`]: text_input/struct.State.html
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
mod platform { mod platform {
pub use iced_wgpu::widget::*; pub use iced_wgpu::widget::{
button, checkbox, container, pane_grid, progress_bar, radio,
scrollable, slider, text_input,
};
#[cfg(feature = "canvas")]
#[cfg_attr(docsrs, doc(cfg(feature = "canvas")))]
pub use iced_wgpu::widget::canvas;
#[cfg_attr(docsrs, doc(cfg(feature = "image")))]
pub mod image { pub mod image {
//! Display images in your user interface. //! Display images in your user interface.
pub use iced_winit::image::{Handle, Image}; pub use iced_winit::image::{Handle, Image};
} }
#[cfg_attr(docsrs, doc(cfg(feature = "svg")))]
pub mod svg { pub mod svg {
//! Display vector graphics in your user interface. //! Display vector graphics in your user interface.
pub use iced_winit::svg::{Handle, Svg}; pub use iced_winit::svg::{Handle, Svg};