pub enum Import {
ImportFrom {
leading_dots: usize,
path: Vec<Name>,
names: Vec<(Name, Option<Name>)>,
},
ImportStarFrom {
leading_dots: usize,
path: Vec<Name>,
},
Import {
names: Vec<(Vec<Name>, Option<Name>)>,
},
}
Expand description
An import statement.
Variants§
ImportFrom
from x import y
Fields
ImportStarFrom
For from x import *
, this is vec![]
.
Import
import x.y as z, foo.bar
is
Import::Import(vec![(vec![x, y], Some(z)), (vec![foo, bar], None)])
.
Trait Implementations§
impl Eq for Import
impl StructuralPartialEq for Import
Auto Trait Implementations§
impl Freeze for Import
impl RefUnwindSafe for Import
impl Send for Import
impl Sync for Import
impl Unpin for Import
impl UnwindSafe for Import
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