diff options
author | 2021-11-05 15:31:33 +0700 | |
---|---|---|
committer | 2021-11-05 15:31:33 +0700 | |
commit | aca9d414d311f901cfe6494a28a48a563f17320b (patch) | |
tree | 9cb0f6112d903d6a7337bfc6c1587936197eed20 /native | |
parent | d5f4067defcc033c5963676c872d9245d494db69 (diff) | |
download | iced-aca9d414d311f901cfe6494a28a48a563f17320b.tar.gz iced-aca9d414d311f901cfe6494a28a48a563f17320b.tar.bz2 iced-aca9d414d311f901cfe6494a28a48a563f17320b.zip |
Write missing documentation in `iced_native`
Diffstat (limited to 'native')
-rw-r--r-- | native/src/lib.rs | 2 | ||||
-rw-r--r-- | native/src/overlay/element.rs | 1 | ||||
-rw-r--r-- | native/src/renderer.rs | 8 |
3 files changed, 10 insertions, 1 deletions
diff --git a/native/src/lib.rs b/native/src/lib.rs index 5012b3f4..51b232e9 100644 --- a/native/src/lib.rs +++ b/native/src/lib.rs @@ -28,7 +28,7 @@ //! [`druid`]: https://github.com/xi-editor/druid //! [`raw-window-handle`]: https://github.com/rust-windowing/raw-window-handle //! [renderer]: crate::renderer -//#![deny(missing_docs)] +#![deny(missing_docs)] #![deny(missing_debug_implementations)] #![deny(unused_results)] #![forbid(unsafe_code)] diff --git a/native/src/overlay/element.rs b/native/src/overlay/element.rs index ef676fb4..f418a518 100644 --- a/native/src/overlay/element.rs +++ b/native/src/overlay/element.rs @@ -69,6 +69,7 @@ where ) } + /// Returns the current [`mouse::Interaction`] of the [`Element`]. pub fn mouse_interaction( &self, layout: Layout<'_>, diff --git a/native/src/renderer.rs b/native/src/renderer.rs index 3b04a5c0..ca7ad5a2 100644 --- a/native/src/renderer.rs +++ b/native/src/renderer.rs @@ -61,11 +61,19 @@ pub trait Renderer: Sized { fn fill_quad(&mut self, quad: Quad, background: impl Into<Background>); } +/// A polygon with four sides. #[derive(Debug, Clone, Copy, PartialEq)] pub struct Quad { + /// The bounds of the [`Quad`]. pub bounds: Rectangle, + + /// The border radius of the [`Quad`]. pub border_radius: f32, + + /// The border width of the [`Quad`]. pub border_width: f32, + + /// The border color of the [`Quad`]. pub border_color: Color, } |