.. _bibble.util.pair_stack: ====================== bibble.util.pair_stack ====================== .. py:module:: bibble.util.pair_stack Type Aliases ------------ .. autoapisummary:: bibble.util.pair_stack.UniMiddleware Classes ------- .. autoapisummary:: bibble.util.pair_stack.PairStack Module Contents =============== .. py:data:: UniMiddleware :type: TypeAlias :value: API.UniMiddleware .. _bibble.util.pair_stack.PairStack: .. py:class:: PairStack A pair of middleware stacks, allowing reader/writer pairs to be added at the same time The read stack is Fifo, the write stack is Lifo. So any transforms are undone in the correct order before writing. Parse[m1, m2, m3] -> Write[m3, m2, m1] eg: Parse[LatexToUnicode, SplitName] -> Write[MergeNames, UnicodeToLatex] .. py:method:: add(*bidis, read = None, write = None) -> Add middlewares to the read/write stacks. Args *must* be bidirection, and will be added to both. kwargs 'read' and 'write' just add to specific stacks .. py:method:: has_read_transform(mid) -> .. py:method:: has_write_transform(mid) -> .. py:method:: read_stack() -> Return the read stack .. py:method:: write_stack() -> Return the write stack .. py:attribute:: _read_time :type: jgdv.Fifo[Middleware] .. py:attribute:: _write_time :type: jgdv.Lifo[Middleware]