pub enum MapEntryIndex {
Named(NamePath),
NatRange(u64),
}Expand description
An index key in a map literal entry.
Plain map literals use named indexes. Table literals over Nat axes desugar
to map entries with an explicitly typed Nat range key so downstream passes
do not have to recover range(N) semantics from a fabricated index name.
Variants§
Implementations§
Source§impl MapEntryIndex
impl MapEntryIndex
Sourcepub fn named_registry_name(&self) -> Option<IndexName>
pub fn named_registry_name(&self) -> Option<IndexName>
Return the leaf registry name for declared named indexes only.
Nat ranges are not declared registry indexes; callers must pattern-match
and use a typed Nat-range identity instead of fabricating an IndexName.
Trait Implementations§
Source§impl Clone for MapEntryIndex
impl Clone for MapEntryIndex
Source§fn clone(&self) -> MapEntryIndex
fn clone(&self) -> MapEntryIndex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MapEntryIndex
impl Debug for MapEntryIndex
Source§impl Display for MapEntryIndex
impl Display for MapEntryIndex
impl Eq for MapEntryIndex
Source§impl FormatEquivalent for MapEntryIndex
impl FormatEquivalent for MapEntryIndex
Source§fn format_equivalent(&self, other: &Self) -> bool
fn format_equivalent(&self, other: &Self) -> bool
Returns
true if self and other are equivalent up to formatting.Source§impl From<NamePath> for MapEntryIndex
impl From<NamePath> for MapEntryIndex
Source§impl PartialEq for MapEntryIndex
impl PartialEq for MapEntryIndex
Source§fn eq(&self, other: &MapEntryIndex) -> bool
fn eq(&self, other: &MapEntryIndex) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MapEntryIndex
Auto Trait Implementations§
impl Freeze for MapEntryIndex
impl RefUnwindSafe for MapEntryIndex
impl Send for MapEntryIndex
impl Sync for MapEntryIndex
impl Unpin for MapEntryIndex
impl UnsafeUnpin for MapEntryIndex
impl UnwindSafe for MapEntryIndex
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.