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 7 mod cache; 8 mod layout; 9 mod node; 10 pub mod traits; 11 12 pub use cache::Cache; 13 pub use layout::{CollapsibleMarginSet, Layout, LayoutInput, LayoutOutput, RequestedAxis, RunMode, SizingMode}; 14 pub use node::NodeId; 15 pub(crate) use traits::LayoutPartialTreeExt; 16 pub use traits::{LayoutPartialTree, PrintTree, RoundTree, TraversePartialTree, TraverseTree}; 17 18 #[cfg(feature = "flexbox")] 19 pub use traits::LayoutFlexboxContainer; 20 21 #[cfg(feature = "grid")] 22 pub use traits::LayoutGridContainer; 23 24 #[cfg(feature = "block_layout")] 25 pub use traits::LayoutBlockContainer; 26 27 #[cfg(feature = "taffy_tree")] 28 mod taffy_tree; 29 #[cfg(feature = "taffy_tree")] 30 pub use taffy_tree::{TaffyError, TaffyResult, TaffyTree}; 31 32 #[cfg(feature = "detailed_layout_info")] 33 pub use layout::DetailedLayoutInfo; 34