pub struct IndexedId {
pub prefix: &'static str,
pub index: usize,
}Expand description
Indexed module ID containing a prefix part (e.g., snippet).
The ID is Displayed as {prefix} #{index + 1}:
let module_id = IndexedId::new("snippet", 4);
assert_eq!(module_id.to_string(), "snippet #5");Fields§
§prefix: &'static strPrefix that can identify the nature of the module, such as snippet.
index: usize0-based index of the module.
Implementations§
Trait Implementations§
impl Copy for IndexedId
impl Eq for IndexedId
impl ModuleId for IndexedId
impl StructuralPartialEq for IndexedId
Auto Trait Implementations§
impl Freeze for IndexedId
impl RefUnwindSafe for IndexedId
impl Send for IndexedId
impl Sync for IndexedId
impl Unpin for IndexedId
impl UnwindSafe for IndexedId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.