pub enum DigestedData {
TBox(RefCell<Tbox>),
Whatsit(RefCell<Whatsit>),
Alignment(Box<RefCell<Alignment>>),
List(RefCell<List>),
Postponed(Tokens),
KeyVals(Box<KeyVals>),
RegisterValue(RegisterValue),
Comment(Comment),
}Expand description
These are all kinds of data which we consider officially supported as outputs from the digestion phase of TeX, i.e. from invoking a token.
Variants§
TBox(RefCell<Tbox>)
A TeX Box
Whatsit(RefCell<Whatsit>)
A TeX Whatsit (with interior mutability, for setters invoked while stored in state)
Alignment(Box<RefCell<Alignment>>)
A TeX Alignment (with interior mutability, for setters invoked while stored in state)
List(RefCell<List>)
A list of Digested data
Postponed(Tokens)
Raw Tokens that were postponed to the digestion phase uninvoked/undigested
KeyVals(Box<KeyVals>)
A LaTeX-like digested key-value map.
Boxed to keep it off the hot DigestedData size budget: KeyVals is a
heavy struct (two Strings, three Vecs, two HashMaps ≈ 208 B) but a
rare variant, whereas DigestedData is Rc-allocated once per box and
every box in a document pays its size. Inlining KeyVals made the whole
enum 208 B; boxing it took 40 B off every digested box (issue #361 memory
pass, M2), and the added indirection only touches the rare KeyVals
accesses. Measured at 0.83 % of live boxes on the #361 witness — the
rarity is what makes the trade pay.
RegisterValue(RegisterValue)
A TeX-like RegisterValue (e.g. a Dimension or Glue)
Comment(Comment)
A TeX comment