Skip to main content

Module tree

Module tree 

Expand description

Contains both a high-level interface to Taffy using a ready-made node tree, and a set of traits for defining custom node trees.

  • For documentation on the high-level API, see the TaffyTree struct.
  • For documentation on the low-level trait-based API, see the traits module.

Modules§

traits
The abstractions that make up the core of Taffy’s low-level API

Structs§

Cache
A cache for caching the results of a sizing a Grid Item or Flexbox Item
CollapsibleMarginSet
A set of margins that are available for collapsing with for block layout’s margin collapsing
Layout
The final result of a layout algorithm for a single node.
LayoutInput
A struct containing the inputs constraints/hints for laying out a node, which are passed in by the parent
LayoutOutput
A struct containing the result of laying a single node, which is returned up to the parent node
NodeId
A type representing the id of a single node in a tree of nodes
TaffyTree
An entire tree of UI nodes. The entry point to Taffy’s high-level API.

Enums§

ClearState
Clear operation outcome. See Cache::clear
DetailedLayoutInfo
The additional information from layout algorithm
RequestedAxis
An axis that layout algorithms can be requested to compute a size for
RunMode
Whether we are performing a full layout, or we merely need to size the node
SizingMode
Whether styles should be taken into account when computing size
TaffyError
An error that occurs while trying to access or modify a node’s children by index.

Traits§

LayoutBlockContainer
Extends LayoutPartialTree with getters for the styles required for CSS Block layout
LayoutFlexboxContainer
Extends LayoutPartialTree with getters for the styles required for Flexbox layout
LayoutGridContainer
Extends LayoutPartialTree with getters for the styles required for CSS Grid layout
LayoutPartialTree
Any type that implements LayoutPartialTree can be laid out using Taffy’s algorithms
PrintTree
Trait used by the print_tree method which prints a debug representation
RoundTree
Trait used by the round_layout method which takes a tree of unrounded float-valued layouts and performs rounding to snap the values to the pixel grid.
TraversePartialTree
Taffy’s abstraction for downward tree traversal.
TraverseTree
A marker trait which extends TraversePartialTree

Type Aliases§

TaffyResult
The error Taffy generates on invalid operations