Struct debris_hir::ImportDependencies
source · pub struct ImportDependencies {
pub(crate) modules: IndexSet<Ident>,
pub(crate) spans: Vec<Span>,
}
Expand description
Keeps track of all imported modules, uses indexes as keys
Fields§
§modules: IndexSet<Ident>
§spans: Vec<Span>
The spans that correspond to the modules. Access via the index of the module
Implementations§
source§impl ImportDependencies
impl ImportDependencies
sourcepub fn insert(&mut self, value: Ident, span: Span) -> usize
pub fn insert(&mut self, value: Ident, span: Span) -> usize
Inserts a dependency and the code span and returns its index
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, index: usize) -> (&Ident, Span)
pub fn iter(&self) -> impl Iterator<Item = (&Ident, Span)>
Trait Implementations§
source§impl Debug for ImportDependencies
impl Debug for ImportDependencies
source§impl Default for ImportDependencies
impl Default for ImportDependencies
source§fn default() -> ImportDependencies
fn default() -> ImportDependencies
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ImportDependencies
impl Send for ImportDependencies
impl Sync for ImportDependencies
impl Unpin for ImportDependencies
impl UnwindSafe for ImportDependencies
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