pub struct ImportDecl {
pub matching_source: Fragment,
pub imported_item: Path,
pub imported_as: Option<Identifier>,
}Available on crate feature
ast-models only.Expand description
A use item::from::elsewhere [as name]; declaration in a wright source file.
Fields§
§matching_source: FragmentThe full matching source of the declaration, whitespace and all.
imported_item: PathThe item being imported.
imported_as: Option<Identifier>The name it’s imported as (usually None).
Trait Implementations§
Source§impl Clone for ImportDecl
impl Clone for ImportDecl
Source§impl Debug for ImportDecl
impl Debug for ImportDecl
Source§impl PartialEq for ImportDecl
impl PartialEq for ImportDecl
impl StructuralPartialEq for ImportDecl
Auto Trait Implementations§
impl Forget for ImportDecl
impl Freeze for ImportDecl
impl RefUnwindSafe for ImportDecl
impl Send for ImportDecl
impl Sync for ImportDecl
impl Unpin for ImportDecl
impl UnsafeUnpin for ImportDecl
impl UnwindSafe for ImportDecl
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