Fix broken intra-doc links in documentation
This commit is contained in:
parent
ac35fe3edf
commit
68e9eb0a9b
28 changed files with 96 additions and 71 deletions
|
|
@ -1,24 +1,4 @@
|
|||
//! Write your own renderer.
|
||||
//!
|
||||
//! You will need to implement the `Renderer` trait first. It simply contains
|
||||
//! an `Output` associated type.
|
||||
//!
|
||||
//! There is no common trait to draw all the widgets. Instead, every [`Widget`]
|
||||
//! constrains its generic `Renderer` type as necessary.
|
||||
//!
|
||||
//! This approach is flexible and composable. For instance, the
|
||||
//! [`Text`] widget only needs a [`text::Renderer`] while a [`Checkbox`] widget
|
||||
//! needs both a [`text::Renderer`] and a [`checkbox::Renderer`], reusing logic.
|
||||
//!
|
||||
//! In the end, a __renderer__ satisfying all the constraints is
|
||||
//! needed to build a [`UserInterface`].
|
||||
//!
|
||||
//! [`Widget`]: crate::Widget
|
||||
//! [`UserInterface`]: crate::UserInterface
|
||||
//! [`Text`]: crate::widget::Text
|
||||
//! [`text::Renderer`]: crate::widget::text::Renderer
|
||||
//! [`Checkbox`]: crate::widget::Checkbox
|
||||
//! [`checkbox::Renderer`]: crate::widget::checkbox::Renderer
|
||||
#[cfg(debug_assertions)]
|
||||
mod null;
|
||||
#[cfg(debug_assertions)]
|
||||
|
|
@ -27,8 +7,7 @@ pub use null::Null;
|
|||
use crate::layout;
|
||||
use crate::{Background, Color, Element, Rectangle, Vector};
|
||||
|
||||
/// A component that can take the state of a user interface and produce an
|
||||
/// output for its users.
|
||||
/// A component that can be used by widgets to draw themselves on a screen.
|
||||
pub trait Renderer: Sized {
|
||||
/// Lays out the elements of a user interface.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue