fluid.future.stack

This is a simplified stack implementation optimized to reuse the nodes it creates.

Fluid uses stacks to iterate through tree structures such as Rope or TextRulerCache. The ability to quickly create new stack items is crucial to their performance, and as such avoiding allocations is a must. For this reason, nodes are reused whenever possible, instead of being reclaimed by the GC.

Members

Structs

Stack
struct Stack(T)

Implementation of a stack optimized to reduce allocations.

StackRange
struct StackRange(T)

A StackRange can be used to iterate a stack (starting from top, going to bottom) without modifying it.

Meta