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
12#[doc(hidden)]
13#[cfg(all(debug_assertions, feature = "std"))]
14pub use cache::cache_mode_change_evictions;
15pub use cache::{Cache, ClearState};
16pub use layout::{
17    AxisStaticAlign, AxisStaticEdge, AxisStaticPosition, Baselines, CollapsibleMarginSet, Layout, LayoutInput,
18    LayoutOutput, OofCandidate, OofCandidates, OofPositioningArea, RequestedAxis, RunMode, SizingMode,
19};
20pub use node::NodeId;
21pub(crate) use traits::LayoutPartialTreeExt;
22pub use traits::{LayoutContainingBlock, LayoutPartialTree, PrintTree, RoundTree, TraversePartialTree, TraverseTree};
23
24#[cfg(feature = "flexbox")]
25pub use traits::LayoutFlexboxContainer;
26
27#[cfg(feature = "grid")]
28pub use traits::LayoutGridContainer;
29
30#[cfg(feature = "block_layout")]
31pub use traits::LayoutBlockContainer;
32
33#[cfg(feature = "taffy_tree")]
34mod taffy_tree;
35#[cfg(feature = "taffy_tree")]
36pub use taffy_tree::{TaffyError, TaffyResult, TaffyTree};
37
38pub use layout::DetailedLayoutInfo;