pub struct Definitions { /* private fields */ }Expand description
Every function a program defines at its top level: the denominator of coverage, and the table that turns a closure’s runtime key back into a name and a place.
Implementations§
Source§impl Definitions
impl Definitions
Sourcepub fn of(program: &ResolvedProgram, erased: &[Spanned]) -> Self
pub fn of(program: &ResolvedProgram, erased: &[Spanned]) -> Self
Read off the tree the evaluator runs (erased, one form per top-level
form of program).
pub fn iter(&self) -> impl Iterator<Item = &Definition>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, index: usize) -> Option<&Definition>
Trait Implementations§
Source§impl Debug for Definitions
impl Debug for Definitions
Auto Trait Implementations§
impl Freeze for Definitions
impl RefUnwindSafe for Definitions
impl Send for Definitions
impl Sync for Definitions
impl Unpin for Definitions
impl UnsafeUnpin for Definitions
impl UnwindSafe for Definitions
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