Write documentation for the new text APIs

This commit is contained in:
Héctor Ramón Jiménez 2023-10-27 05:04:14 +02:00
parent 6582387579
commit 625cd745f3
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
16 changed files with 185 additions and 22 deletions

View file

@ -4,19 +4,24 @@ use crate::core::{Color, Font, Pixels, Point, Rectangle};
use crate::graphics::text::editor;
use crate::graphics::text::paragraph;
/// A paragraph of text.
/// A text primitive.
#[derive(Debug, Clone)]
pub enum Text<'a> {
/// A paragraph.
#[allow(missing_docs)]
Paragraph {
paragraph: paragraph::Weak,
position: Point,
color: Color,
},
/// An editor.
#[allow(missing_docs)]
Editor {
editor: editor::Weak,
position: Point,
color: Color,
},
/// A cached text.
Cached(Cached<'a>),
}

View file

@ -23,7 +23,7 @@
#![forbid(rust_2018_idioms)]
#![deny(
missing_debug_implementations,
//missing_docs,
missing_docs,
unsafe_code,
unused_results,
rustdoc::broken_intra_doc_links