Struct smithay::wayland::SerialCounter
source · pub struct SerialCounter { /* private fields */ }
Expand description
A counter for generating serials, for use in the client protocol
A global instance of this counter is available as the SERIAL_COUNTER
static. It is recommended to only use this global counter to ensure the
uniqueness of serials.
The counter will wrap around on overflow, ensuring it can run for as long as needed.
Implementations§
source§impl SerialCounter
impl SerialCounter
sourcepub fn next_serial(&self) -> u32
pub fn next_serial(&self) -> u32
Retrieve the next serial from the counter