Skip to main content

IdGenerator

Trait IdGenerator 

Source
pub trait IdGenerator {
    // Required methods
    fn next_buffer_id(&mut self) -> BufferId;
    fn next_undo_group_id(&mut self) -> UndoGroupId;
}
Expand description

Identifier source used for undo groups.

Hosts that need reproducible operation streams can inject a deterministic implementation with Engine::with_id_generator.

Required Methods§

Source

fn next_buffer_id(&mut self) -> BufferId

Return the next buffer identifier.

Source

fn next_undo_group_id(&mut self) -> UndoGroupId

Return the next undo-group identifier.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§