pub struct IdGenerator { /* private fields */ }Expand description
Monotonic id minter shared by a runtime instance.
Frame, window and event id spaces are independent. The generator is
Send + Sync (atomic counters) so it can be shared across the capture,
signal and event tasks.
Implementations§
Source§impl IdGenerator
impl IdGenerator
Sourcepub fn next_frame(&self) -> FrameId
pub fn next_frame(&self) -> FrameId
Next frame id.
Sourcepub fn next_window(&self) -> WindowId
pub fn next_window(&self) -> WindowId
Next window id.
Sourcepub fn next_event(&self) -> EventId
pub fn next_event(&self) -> EventId
Next event id.
Sourcepub fn next_session(&self) -> SessionId
pub fn next_session(&self) -> SessionId
Next session id.
Trait Implementations§
Source§impl Debug for IdGenerator
impl Debug for IdGenerator
Source§impl Default for IdGenerator
impl Default for IdGenerator
Source§fn default() -> IdGenerator
fn default() -> IdGenerator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for IdGenerator
impl RefUnwindSafe for IdGenerator
impl Send for IdGenerator
impl Sync for IdGenerator
impl Unpin for IdGenerator
impl UnsafeUnpin for IdGenerator
impl UnwindSafe for IdGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more