pub struct TypeIndex { /* private fields */ }Expand description
Index over declaration type attributes: sort level and Pi-type arity.
Enables efficient retrieval of all declarations with a given sort level or a given number of explicit arguments.
Implementations§
Source§impl TypeIndex
impl TypeIndex
Sourcepub fn add_by_sort(&mut self, sort_level: u8, id: u32)
pub fn add_by_sort(&mut self, sort_level: u8, id: u32)
Record that declaration id has outermost sort level sort_level.
Sourcepub fn add_by_arity(&mut self, arity: u32, id: u32)
pub fn add_by_arity(&mut self, arity: u32, id: u32)
Record that declaration id has Pi arity arity.
Sourcepub fn lookup_by_sort(&self, sort_level: u8) -> Vec<u32>
pub fn lookup_by_sort(&self, sort_level: u8) -> Vec<u32>
Return all declaration ids with outermost sort level sort_level.
Sourcepub fn lookup_by_arity(&self, arity: u32) -> Vec<u32>
pub fn lookup_by_arity(&self, arity: u32) -> Vec<u32>
Return all declaration ids with Pi arity arity.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TypeIndex
impl RefUnwindSafe for TypeIndex
impl Send for TypeIndex
impl Sync for TypeIndex
impl Unpin for TypeIndex
impl UnsafeUnpin for TypeIndex
impl UnwindSafe for TypeIndex
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