Expand description
Contains both a high-level interface to Taffy using a ready-made node tree, and a trait for defining a custom node trees / utility types to help with that.
Structs§
- Cache
- A cache for caching the results of a sizing a Grid Item or Flexbox Item
- Collapsible
Margin Set - 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.
- Layout
Input - A struct containing the inputs constraints/hints for laying out a node, which are passed in by the parent
- Layout
Output - 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
- Taffy
Tree - An entire tree of UI nodes. The entry point to Taffy’s high-level API.
Enums§
- Requested
Axis - 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
- Sizing
Mode - Whether styles should be taken into account when computing size
- Taffy
Error - An error that occurs while trying to access or modify a node’s children by index.
Traits§
- Layout
Tree - Extends
PartialLayoutTree
with an additional guarantee: that the child/children methods can be used to recurse infinitely down the tree. Enables Taffy’s rounding and debug printing methods to be used. - Partial
Layout Tree - This if the core abstraction in Taffy. Any type that correctly implements
PartialLayoutTree
can be laid out using Taffy’s algorithms.
Type Aliases§
- Taffy
Result - The error Taffy generates on invalid operations