pub struct Units<'a> { /* private fields */ }Expand description
Every unit the runtime holds, static and dynamic, for reading.
Implementations§
Source§impl<'a> Units<'a>
impl<'a> Units<'a>
Sourcepub fn get(self, id: CodeUnitId) -> UnitRef<'a>
pub fn get(self, id: CodeUnitId) -> UnitRef<'a>
The unit id.
Sourcepub fn lookup(self, id: CodeUnitId) -> Option<&'a CodeUnit>
pub fn lookup(self, id: CodeUnitId) -> Option<&'a CodeUnit>
The unit id, if it is published.
Sourcepub fn tree(self, id: CodeUnitId) -> Vec<CodeUnitId>
pub fn tree(self, id: CodeUnitId) -> Vec<CodeUnitId>
id and its descendants in pre-order: the order in which
Runtime::instantiate takes their
constant tables.
Sourcepub fn all(self) -> impl Iterator<Item = (CodeUnitId, &'a CodeUnit)>
pub fn all(self) -> impl Iterator<Item = (CodeUnitId, &'a CodeUnit)>
Every unit with its id: the static ones in publication order, then the live dynamic ones by slot.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Send for Units<'a>
impl<'a> !Sync for Units<'a>
impl<'a> Freeze for Units<'a>
impl<'a> RefUnwindSafe for Units<'a>
impl<'a> Unpin for Units<'a>
impl<'a> UnsafeUnpin for Units<'a>
impl<'a> UnwindSafe for Units<'a>
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