Small fixes

This commit is contained in:
Laurenz 2022-10-18 10:02:52 +02:00
parent c0e972b91a
commit 66030ae5d7
3 changed files with 12 additions and 16 deletions

View File

@ -130,13 +130,13 @@ impl Default for Config {
/// Definition of certain standard library items the language is aware of. /// Definition of certain standard library items the language is aware of.
#[derive(Debug, Clone, Hash)] #[derive(Debug, Clone, Hash)]
pub struct RoleMap { pub struct RoleMap {
strong: fn(Content) -> Content, pub strong: fn(Content) -> Content,
emph: fn(Content) -> Content, pub emph: fn(Content) -> Content,
raw: fn(EcoString, Option<EcoString>, bool) -> Content, pub raw: fn(EcoString, Option<EcoString>, bool) -> Content,
link: fn(EcoString) -> Content, pub link: fn(EcoString) -> Content,
ref_: fn(EcoString) -> Content, pub ref_: fn(EcoString) -> Content,
heading: fn(NonZeroUsize, Content) -> Content, pub heading: fn(NonZeroUsize, Content) -> Content,
list_item: fn(Content) -> Content, pub list_item: fn(Content) -> Content,
enum_item: fn(Option<usize>, Content) -> Content, pub enum_item: fn(Option<usize>, Content) -> Content,
desc_item: fn(Content, Content) -> Content, pub desc_item: fn(Content, Content) -> Content,
} }

View File

@ -1,6 +1,6 @@
//! The standard library. //! The standard library.
//! //!
//! Call [`new`] to obtain a [`Scope`] containing all standard library //! Call [`scope`] to obtain a [`Scope`] containing all standard library
//! definitions. //! definitions.
pub mod graphics; pub mod graphics;

View File

@ -133,15 +133,11 @@ impl Debug for KeyId {
/// This trait is not intended to be implemented manually, but rather through /// This trait is not intended to be implemented manually, but rather through
/// the `#[node]` proc-macro. /// the `#[node]` proc-macro.
pub trait Key<'a>: Copy + 'static { pub trait Key<'a>: Copy + 'static {
/// The unfolded type which this property is stored as in a style map. For /// The unfolded type which this property is stored as in a style map.
/// example, this is [`Toggle`](crate::geom::Length) for the
/// [`BOLD`](crate::library::text::TextNode::BOLD) property.
type Value: Debug + Clone + Hash + Sync + Send + 'static; type Value: Debug + Clone + Hash + Sync + Send + 'static;
/// The folded type of value that is returned when reading this property /// The folded type of value that is returned when reading this property
/// from a style chain. For example, this is [`bool`] for the /// from a style chain.
/// [`BOLD`](crate::library::text::TextNode::BOLD) property. For non-copy,
/// non-folding properties this is a reference type.
type Output; type Output;
/// The name of the property, used for debug printing. /// The name of the property, used for debug printing.