pub struct NameIdTracker {
id: u64,
}
Fields§
§id: u64
Implementations§
Source§impl NameIdTracker
impl NameIdTracker
pub fn new() -> Self
pub fn new_at(id: u64) -> Self
pub fn next(&mut self) -> u64
pub fn peek(&self) -> u64
Sourcepub fn make_clone(&self) -> Self
pub fn make_clone(&self) -> Self
Clone this ID tracker. After this is done, only one of the ID trackers may be used otherwise duplicate IDs will be generated. It is up to the caller of this method to make sure that no mutable references are handed out to one of the clonse
Trait Implementations§
Source§impl Debug for NameIdTracker
impl Debug for NameIdTracker
Source§impl Default for NameIdTracker
impl Default for NameIdTracker
Source§impl<'de> Deserialize<'de> for NameIdTracker
impl<'de> Deserialize<'de> for NameIdTracker
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NameIdTracker
impl RefUnwindSafe for NameIdTracker
impl Send for NameIdTracker
impl Sync for NameIdTracker
impl Unpin for NameIdTracker
impl UnwindSafe for NameIdTracker
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