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>)>,
},
}
Fields of ImportFrom
leading_dots: usize | For from .....x import y , this is 5
|
path: Vec<Name> | For from .....x import y , this x
|
names: Vec<(Name, Option<Name>)> | For from x import y, z , this vec![(y, None), (vec![z], None)] .
For from x import y as z , this vec![(y, Some(z))] .
|
For from x import *
, this is vec![]
.
Fields of ImportStarFrom
import x.y as z, foo.bar
is
Import::Import(vec![(vec![x, y], Some(z)), (vec![foo, bar], None)])
.
Fields of Import
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more