pub struct ImportPath {
pub segments: Vec<String>,
pub alias: Option<String>,
}Expand description
A use import statement, with optional alias.
For use std::fs::read as load, the segments are ["std", "fs", "read"] and
the alias is Some("load"). The Detector uses
this to expand bare calls: when it sees load(...), it looks up the alias and
expands it to std::fs::read.
Fields§
§segments: Vec<String>The full path segments (e.g., ["std", "fs", "read"]).
alias: Option<String>The as alias, if any (e.g., Some("load") for use std::fs::read as load).
Trait Implementations§
Source§impl Clone for ImportPath
impl Clone for ImportPath
Source§fn clone(&self) -> ImportPath
fn clone(&self) -> ImportPath
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 ImportPath
impl RefUnwindSafe for ImportPath
impl Send for ImportPath
impl Sync for ImportPath
impl Unpin for ImportPath
impl UnsafeUnpin for ImportPath
impl UnwindSafe for ImportPath
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