pub struct RootMap {
pub subpackages: BTreeMap<Id, SpannedPackageInfo>,
pub classes: BTreeMap<DotId, Arc<ClassInfo>>,
pub upcasts: Upcasts,
}Expand description
Stores all the data about the classes/packages to be translated as well as whatever we have learned from reflection.
Fields§
§subpackages: BTreeMap<Id, SpannedPackageInfo>§classes: BTreeMap<DotId, Arc<ClassInfo>>§upcasts: UpcastsImplementations§
Source§impl RootMap
impl RootMap
Sourcepub fn find_class(&self, cn: &DotId) -> Option<&Arc<ClassInfo>>
pub fn find_class(&self, cn: &DotId) -> Option<&Arc<ClassInfo>>
Finds the class with the given name (if present).
Sourcepub fn find_package(&self, ids: &[Id]) -> Option<&SpannedPackageInfo>
pub fn find_package(&self, ids: &[Id]) -> Option<&SpannedPackageInfo>
Finds the package with the given name (if present).
pub fn to_packages(&self) -> impl Iterator<Item = &SpannedPackageInfo>
Sourcepub fn class_names(&self) -> Vec<DotId>
pub fn class_names(&self) -> Vec<DotId>
Find the names of all classes contained within.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RootMap
impl RefUnwindSafe for RootMap
impl !Send for RootMap
impl !Sync for RootMap
impl Unpin for RootMap
impl UnwindSafe for RootMap
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