summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-12-30 12:12:19 +0100
committerLaurenz <laurmaedje@gmail.com>2021-12-30 12:12:19 +0100
commitf174134aa23e96a2121fb4106fb23fbdad4d641a (patch)
tree7c842c8af3383805bbc7b835daecc71e8ba616e6 /src/lib.rs
parent5d5d8a21cfc041ab08d30229f4ecb4cbb415cbc5 (diff)
Style chains
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib.rs b/src/lib.rs
index fd1291ed..39507d79 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -55,7 +55,7 @@ pub mod syntax;
use std::rc::Rc;
use crate::diag::TypResult;
-use crate::eval::{Eval, EvalContext, Module, Scope, Styles};
+use crate::eval::{Eval, EvalContext, Module, Scope, StyleMap};
use crate::font::FontStore;
use crate::frame::Frame;
use crate::image::ImageStore;
@@ -80,7 +80,7 @@ pub struct Context {
/// The standard library scope.
std: Scope,
/// The default styles.
- styles: Styles,
+ styles: StyleMap,
}
impl Context {
@@ -100,7 +100,7 @@ impl Context {
}
/// A read-only reference to the styles.
- pub fn styles(&self) -> &Styles {
+ pub fn styles(&self) -> &StyleMap {
&self.styles
}
@@ -140,7 +140,7 @@ impl Context {
/// This struct is created by [`Context::builder`].
pub struct ContextBuilder {
std: Option<Scope>,
- styles: Option<Styles>,
+ styles: Option<StyleMap>,
#[cfg(feature = "layout-cache")]
policy: EvictionPolicy,
#[cfg(feature = "layout-cache")]
@@ -156,7 +156,7 @@ impl ContextBuilder {
}
/// The default properties for page size, font selection and so on.
- pub fn styles(mut self, styles: Styles) -> Self {
+ pub fn styles(mut self, styles: StyleMap) -> Self {
self.styles = Some(styles);
self
}