summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-05-16 19:13:39 +0200
committerLaurenz <laurmaedje@gmail.com>2022-05-16 20:22:48 +0200
commit242b01549a472d4eeca1404b8f63427e23224253 (patch)
tree7d44ef801ce857469912a75233a1e7a1603e405e /src/model
parenta741bd6b83d1e374c8218b5439e26522499cc4ae (diff)
Safe `eval` function
Diffstat (limited to 'src/model')
-rw-r--r--src/model/property.rs10
-rw-r--r--src/model/styles.rs3
2 files changed, 7 insertions, 6 deletions
diff --git a/src/model/property.rs b/src/model/property.rs
index b35ffba9..ff686970 100644
--- a/src/model/property.rs
+++ b/src/model/property.rs
@@ -131,13 +131,13 @@ impl Debug for KeyId {
pub trait Key<'a>: Copy + 'static {
/// The unfolded type which this property is stored as in a style map. For
/// example, this is [`Toggle`](crate::geom::Length) for the
- /// [`STRONG`](TextNode::STRONG) property.
+ /// [`STRONG`](crate::library::text::TextNode::STRONG) property.
type Value: Debug + Clone + Hash + Sync + Send + 'static;
/// The folded type of value that is returned when reading this property
/// from a style chain. For example, this is [`bool`] for the
- /// [`STRONG`](TextNode::STRONG) property. For non-copy, non-folding
- /// properties this is a reference type.
+ /// [`STRONG`](crate::library::text::TextNode::STRONG) property. For
+ /// non-copy, non-folding properties this is a reference type.
type Output;
/// The name of the property, used for debug printing.
@@ -274,8 +274,8 @@ impl Fold for Sides<Option<Smart<Relative<RawLength>>>> {
/// A scoped property barrier.
///
-/// Barriers interact with [scoped](StyleMap::scoped) styles: A scoped style
-/// can still be read through a single barrier (the one of the node it
+/// Barriers interact with [scoped](super::StyleMap::scoped) styles: A scoped
+/// style can still be read through a single barrier (the one of the node it
/// _should_ apply to), but a second barrier will make it invisible.
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Barrier(NodeId);
diff --git a/src/model/styles.rs b/src/model/styles.rs
index 928133c7..5c36861a 100644
--- a/src/model/styles.rs
+++ b/src/model/styles.rs
@@ -103,7 +103,8 @@ impl StyleMap {
/// Mark all contained properties as _scoped_. This means that they only
/// apply to the first descendant node (of their type) in the hierarchy and
- /// not its children, too. This is used by [constructors](Node::construct).
+ /// not its children, too. This is used by
+ /// [constructors](crate::eval::Node::construct).
pub fn scoped(mut self) -> Self {
for entry in &mut self.0 {
if let StyleEntry::Property(property) = entry {