pub enum NatRangeIndexRef {
Concrete(NatRangeIndex),
Symbolic(NatPolyForm),
}Expand description
Type-level reference to a compiler-generated Nat range index.
Concrete Nat ranges carry a validated in-memory size. Symbolic Nat ranges carry the normalized type-level arithmetic form directly; no fake resolved name or parseable display string is used as semantic identity.
Variants§
Concrete(NatRangeIndex)
Symbolic(NatPolyForm)
Implementations§
Source§impl NatRangeIndexRef
impl NatRangeIndexRef
Sourcepub fn from_form(form: NatPolyForm) -> Result<Self, NatRangeIndexError>
pub fn from_form(form: NatPolyForm) -> Result<Self, NatRangeIndexError>
Create a Nat range reference from a normalized Nat form.
§Errors
Returns an error when the form is a concrete invalid Nat range size.
Sourcepub const fn concrete_index(&self) -> Option<NatRangeIndex>
pub const fn concrete_index(&self) -> Option<NatRangeIndex>
Return the concrete Nat range identity, if this reference is concrete.
Sourcepub fn form(&self) -> NatPolyForm
pub fn form(&self) -> NatPolyForm
Return the normalized Nat form for this reference.
Sourcepub fn display_name(&self) -> NameDef<Index>
pub fn display_name(&self) -> NameDef<Index>
Render this Nat range as a source-like display name for diagnostics.
Sourcepub fn matches_ref(&self, other: &Self) -> bool
pub fn matches_ref(&self, other: &Self) -> bool
Compare Nat range references by typed identity.
Trait Implementations§
Source§impl Clone for NatRangeIndexRef
impl Clone for NatRangeIndexRef
Source§fn clone(&self) -> NatRangeIndexRef
fn clone(&self) -> NatRangeIndexRef
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 NatRangeIndexRef
impl Debug for NatRangeIndexRef
impl Eq for NatRangeIndexRef
Source§impl Hash for NatRangeIndexRef
impl Hash for NatRangeIndexRef
Source§impl PartialEq for NatRangeIndexRef
impl PartialEq for NatRangeIndexRef
Source§fn eq(&self, other: &NatRangeIndexRef) -> bool
fn eq(&self, other: &NatRangeIndexRef) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NatRangeIndexRef
Auto Trait Implementations§
impl Freeze for NatRangeIndexRef
impl RefUnwindSafe for NatRangeIndexRef
impl Send for NatRangeIndexRef
impl Sync for NatRangeIndexRef
impl Unpin for NatRangeIndexRef
impl UnsafeUnpin for NatRangeIndexRef
impl UnwindSafe for NatRangeIndexRef
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.