pub struct ImportFact {
pub file_path: PathBuf,
pub import_kind: ImportKind,
pub path: Vec<String>,
pub imported_names: Vec<String>,
pub is_glob: bool,
pub is_reexport: bool,
pub byte_span: (usize, usize),
}Expand description
Represents a single import statement in source code.
Fields§
§file_path: PathBufFile path containing the import.
import_kind: ImportKindKind of import (determines resolution strategy).
path: Vec<String>Import path segments (e.g., [“crate”, “b”, “foo”]).
imported_names: Vec<String>Names imported from the path (e.g., [“foo”, “bar”]).
is_glob: boolWhether this is a glob import (e.g., use crate::module::*).
is_reexport: boolWhether this is a re-export (e.g., pub use in Rust).
Re-exports make the imported symbol available to other modules.
byte_span: (usize, usize)Byte span of the import statement in source.
Trait Implementations§
Source§impl Clone for ImportFact
impl Clone for ImportFact
Source§fn clone(&self) -> ImportFact
fn clone(&self) -> ImportFact
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImportFact
impl Debug for ImportFact
Source§impl PartialEq for ImportFact
impl PartialEq for ImportFact
impl StructuralPartialEq for ImportFact
Auto Trait Implementations§
impl Freeze for ImportFact
impl RefUnwindSafe for ImportFact
impl Send for ImportFact
impl Sync for ImportFact
impl Unpin for ImportFact
impl UnsafeUnpin for ImportFact
impl UnwindSafe for ImportFact
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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