diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-02-03 12:22:02 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-02-03 12:22:02 +0100 |
| commit | 3150fd56437ecf8b2a5902c18e3f9ace800b768c (patch) | |
| tree | db8a7e9fc868145804db97da81bd0669aaf55454 /src/layout/model.rs | |
| parent | 40ea35cbe7482ce04096c4d63a848c8601cc1848 (diff) | |
Better Debug/Display and Derives 🧽
Diffstat (limited to 'src/layout/model.rs')
| -rw-r--r-- | src/layout/model.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/layout/model.rs b/src/layout/model.rs index 2eac9a8c..d23968d8 100644 --- a/src/layout/model.rs +++ b/src/layout/model.rs @@ -5,7 +5,6 @@ use std::future::Future; use std::pin::Pin; use smallvec::smallvec; -use toddle::query::{SharedFontLoader, FontProvider}; use crate::GlobalFontLoader; use crate::error::Errors; @@ -19,6 +18,7 @@ use super::*; /// Performs the model layouting. +#[derive(Debug)] pub struct ModelLayouter<'a> { ctx: LayoutContext<'a>, layouter: LineLayouter, @@ -52,6 +52,7 @@ pub struct LayoutContext<'a> { } /// The result of layouting: Some layouted things and a list of errors. +#[derive(Debug, Clone, Eq, PartialEq)] pub struct Layouted<T> { /// The result of the layouting process. pub output: T, @@ -63,7 +64,7 @@ pub struct Layouted<T> { pub type Commands<'a> = Vec<Command<'a>>; /// Commands issued to the layouting engine by models. -#[derive(Debug)] +#[derive(Debug, Clone)] pub enum Command<'a> { /// Layout the given model in the current context (i.e. not nested). The /// content of the model is not laid out into a separate box and then added, |
