pub struct ExportResolver<'a> {
modules: &'a BTreeMap<String, Module>,
}Expand description
Resolver for determining which items are exported from modules
Fields§
§modules: &'a BTreeMap<String, Module>Implementations§
Source§impl<'a> ExportResolver<'a>
impl<'a> ExportResolver<'a>
pub fn new(modules: &'a BTreeMap<String, Module>) -> Self
Sourcepub fn resolve_exports(&self, module: &Module) -> BTreeSet<String>
pub fn resolve_exports(&self, module: &Module) -> BTreeSet<String>
Resolve which items are exported from a module Rules:
- If all exists (re-exports or verbatim): use it
- Otherwise: all non-underscore items
- Add re-exported items
- Add verbatim entries
- Remove excluded items
Sourcepub fn build_export_map(&self) -> BTreeMap<String, String>
pub fn build_export_map(&self) -> BTreeMap<String, String>
Build global map: item_fqn → module_where_exported For re-exports: map to re-exporting module
Auto Trait Implementations§
impl<'a> Freeze for ExportResolver<'a>
impl<'a> RefUnwindSafe for ExportResolver<'a>
impl<'a> Send for ExportResolver<'a>
impl<'a> Sync for ExportResolver<'a>
impl<'a> Unpin for ExportResolver<'a>
impl<'a> UnwindSafe for ExportResolver<'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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more