fields.buffers.registry.BufferRegistry.register#

BufferRegistry.register(buffer_cls: Type[BufferBase], prepend: bool = False) None[source]#

Register a new buffer type.

Parameters:
  • buffer_cls (Type[BufferBase]) – The buffer class to register.

  • prepend (bool, default False) – If True, the class is inserted at the front of the list (overrides priority). Otherwise, it is inserted and re-sorted by resolution priority.

Notes

Buffer classes should define an integer __resolution_priority__ attribute. Higher values mean higher precedence. Classes with equal priority retain insertion order unless prepend=True is used.