pub struct IdGenerator { /* private fields */ }
Expand description
IdGenerator generates a monotonically-increasing sequence of IDs, either TransformIds or ContentIds, depending on what the caller asks for. The ID values are unique both across and within ID types, e.g. a given IdGenerator will not generate two TransformIds with the same value, nor a TransformId and a ContentId with the same value.
Implementations§
Source§impl IdGenerator
impl IdGenerator
pub fn new() -> Self
pub fn new_with_first_id(first_id: u64) -> Self
pub fn next_transform_id(&mut self) -> TransformId
pub fn next_content_id(&mut self) -> ContentId
Auto Trait Implementations§
impl Freeze for IdGenerator
impl RefUnwindSafe for IdGenerator
impl Send for IdGenerator
impl Sync for IdGenerator
impl Unpin 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