Struct arithmetic_eval::exec::IndexedId
source · 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 Display
ed as {prefix} #{index + 1}
:
let module_id = IndexedId::new("snippet", 4);
assert_eq!(module_id.to_string(), "snippet #5");
Fields§
§prefix: &'static str
Prefix that can identify the nature of the module, such as snippet
.
index: usize
0-based index of the module.
Implementations§
Trait Implementations§
source§impl PartialEq<IndexedId> for IndexedId
impl PartialEq<IndexedId> for IndexedId
impl Copy for IndexedId
impl Eq for IndexedId
impl ModuleId for IndexedId
impl StructuralEq for IndexedId
impl StructuralPartialEq for IndexedId
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more