Write missing documentation in iced_native

This commit is contained in:
Héctor Ramón Jiménez 2021-11-05 15:31:33 +07:00
parent d5f4067def
commit aca9d414d3
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
3 changed files with 10 additions and 1 deletions

View file

@ -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)]

View file

@ -69,6 +69,7 @@ where
)
}
/// Returns the current [`mouse::Interaction`] of the [`Element`].
pub fn mouse_interaction(
&self,
layout: Layout<'_>,

View file

@ -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,
}