pub struct InferredIndex { /* private fields */ }Expand description
Index identity carried by inferred collection/label types.
Declared indexes compare by owner-qualified IndexTypeRef. Nat-range
indexes additionally carry their normalized Nat form so generic ranges such
as range(N + 1) are not encoded in or compared through synthetic strings.
Implementations§
Source§impl InferredIndex
impl InferredIndex
pub fn with_owner(owner: DagId, name: IndexName) -> Self
pub fn from_resolved(resolved: ResolvedName<Index>) -> Self
pub const fn from_ref(reference: IndexTypeRef) -> Self
Sourcepub fn from_nat_range_identity(
identity: &NatRangeIndexIdentity,
) -> Result<Self, NatRangeIndexError>
pub fn from_nat_range_identity( identity: &NatRangeIndexIdentity, ) -> Result<Self, NatRangeIndexError>
Create an inferred Nat range index from a validated Nat-range identity.
§Errors
Returns an error if the identity cannot be converted to an index type reference.
Sourcepub fn from_nat_range_form(
form: NatLinearForm,
) -> Result<Self, NatRangeIndexError>
pub fn from_nat_range_form( form: NatLinearForm, ) -> Result<Self, NatRangeIndexError>
Create an inferred Nat range index from a normalized Nat form.
§Errors
Returns an error when the form is a concrete invalid Nat range size.
pub const fn type_ref(&self) -> &IndexTypeRef
pub fn name(&self) -> IndexName
pub const fn declared_resolved(&self) -> Option<&ResolvedName<Index>>
pub const fn concrete_nat_range(&self) -> Option<NatRangeIndex>
pub fn nat_range_form(&self) -> Option<NatLinearForm>
pub fn matches_resolved(&self, expected: &ResolvedName<Index>) -> bool
pub fn matches_ref(&self, expected: &IndexTypeRef) -> bool
Trait Implementations§
Source§impl Clone for InferredIndex
impl Clone for InferredIndex
Source§fn clone(&self) -> InferredIndex
fn clone(&self) -> InferredIndex
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 InferredIndex
impl Debug for InferredIndex
Source§impl Display for InferredIndex
impl Display for InferredIndex
impl Eq for InferredIndex
Source§impl PartialEq for InferredIndex
impl PartialEq for InferredIndex
Auto Trait Implementations§
impl Freeze for InferredIndex
impl RefUnwindSafe for InferredIndex
impl Send for InferredIndex
impl Sync for InferredIndex
impl Unpin for InferredIndex
impl UnsafeUnpin for InferredIndex
impl UnwindSafe for InferredIndex
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.