pub struct ImportStatement {
pub module_path: String,
pub names: Vec<String>,
pub default_import: Option<String>,
pub namespace_import: Option<String>,
pub kind: ImportKind,
pub group: ImportGroup,
pub byte_range: Range<usize>,
pub raw_text: String,
}Expand description
A single parsed import statement.
Fields§
§module_path: StringThe module path (e.g., react, ./utils, ../config).
names: Vec<String>Named imports (e.g., ["useState", "useEffect"]).
default_import: Option<String>Default import name (e.g., React from import React from 'react').
namespace_import: Option<String>Namespace import name (e.g., path from import * as path from 'path').
kind: ImportKindWhat kind: value, type, or side-effect.
group: ImportGroupWhich group this import belongs to.
byte_range: Range<usize>Byte range in the original source.
raw_text: StringRaw text of the import statement.
Trait Implementations§
Source§impl Clone for ImportStatement
impl Clone for ImportStatement
Source§fn clone(&self) -> ImportStatement
fn clone(&self) -> ImportStatement
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 moreAuto Trait Implementations§
impl Freeze for ImportStatement
impl RefUnwindSafe for ImportStatement
impl Send for ImportStatement
impl Sync for ImportStatement
impl Unpin for ImportStatement
impl UnsafeUnpin for ImportStatement
impl UnwindSafe for ImportStatement
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