[][src]Module byte_mutator::undo_buffer

UndoBuffer is a structure that is used to expose an 'undo' interface to a fixed size buffer. It internally maintains two fixed size ArrayVec structures. These arrays are identical on construction, but only one can be written to. UndoBuffer keeps track of which areas of the buffer have been mutably borrowed, and can then reset the buffer back to its original state.

todo: Variably sized buffers.

Structs

UndoBuffer

Fixed size buffer with an original state and a writeable buffer. Tracks which region of the buffer has been exposed for changes and enables an undo of those changes.