pub struct RustImportInfo {
pub module_path: String,
pub symbols: Vec<String>,
pub is_wildcard: bool,
pub aliases: Vec<(String, String)>,
}Expand description
Information extracted from a single Rust use declaration.
Represents the parsed form of a use statement. The coordinator (Task 3.5)
converts these into DependencyEdge
entries.
Fields§
§module_path: StringThe module path as written in the source code, excluding the final symbol(s).
For use std::collections::HashMap this is "std::collections".
For use crate::config::Settings this is "crate::config".
For use serde; (bare crate import) this is "serde".
symbols: Vec<String>Specific symbols imported from the module.
Contains ["HashMap"] for use std::collections::HashMap.
Contains ["HashMap", "HashSet"] for use std::collections::{HashMap, HashSet}.
Empty for bare imports like use serde; or wildcard imports.
is_wildcard: boolWhether this is a wildcard import (use module::*).
aliases: Vec<(String, String)>Aliases for imported names.
Maps original name to alias. For use std::io::Result as IoResult,
contains [("Result", "IoResult")].
Trait Implementations§
Source§impl Clone for RustImportInfo
impl Clone for RustImportInfo
Source§fn clone(&self) -> RustImportInfo
fn clone(&self) -> RustImportInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RustImportInfo
impl Debug for RustImportInfo
Source§impl PartialEq for RustImportInfo
impl PartialEq for RustImportInfo
impl Eq for RustImportInfo
impl StructuralPartialEq for RustImportInfo
Auto Trait Implementations§
impl Freeze for RustImportInfo
impl RefUnwindSafe for RustImportInfo
impl Send for RustImportInfo
impl Sync for RustImportInfo
impl Unpin for RustImportInfo
impl UnsafeUnpin for RustImportInfo
impl UnwindSafe for RustImportInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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