Skip to main content

taffy/tree/
mod.rs

1//! Contains both a high-level interface to Taffy using a ready-made node tree, and a set of traits for defining custom node trees.
2//!
3//! - For documentation on the high-level API, see the [`TaffyTree`] struct.
4//! - For documentation on the low-level trait-based API, see the [`traits`] module.
5
6// Submodules
7mod cache;
8mod layout;
9mod node;
10pub mod traits;
11
12pub use cache::{Cache, ClearState};
13pub use layout::{
14    Baselines, CollapsibleMarginSet, Layout, LayoutInput, LayoutOutput, RequestedAxis, RunMode, SizingMode,
15};
16pub use node::NodeId;
17pub(crate) use traits::LayoutPartialTreeExt;
18pub use traits::{LayoutPartialTree, PrintTree, RoundTree, TraversePartialTree, TraverseTree};
19
20#[cfg(feature = "flexbox")]
21pub use traits::LayoutFlexboxContainer;
22
23#[cfg(feature = "grid")]
24pub use traits::LayoutGridContainer;
25
26#[cfg(feature = "block_layout")]
27pub use traits::LayoutBlockContainer;
28
29#[cfg(feature = "taffy_tree")]
30mod taffy_tree;
31#[cfg(feature = "taffy_tree")]
32pub use taffy_tree::{TaffyError, TaffyResult, TaffyTree};
33
34#[cfg(feature = "detailed_layout_info")]
35pub use layout::DetailedLayoutInfo;