Enum python_parser::ast::Import [−][src]
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>)>,
},
}An import statement.
Variants
ImportFromfrom x import y
Fields of ImportFrom
leading_dots: usize | For |
path: Vec<Name> | For |
names: Vec<(Name, Option<Name>)> | For |
ImportStarFromFor from x import *, this is vec![].
Fields of ImportStarFrom
leading_dots: usize | |
path: Vec<Name> |
Importimport x.y as z, foo.bar is
Import::Import(vec![(vec![x, y], Some(z)), (vec![foo, bar], None)]).
Fields of Import
names: Vec<(Vec<Name>, Option<Name>)> |
Trait Implementations
impl Clone for Import[src]
impl Clone for Importfn clone(&self) -> Import[src]
fn clone(&self) -> ImportReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Debug for Import[src]
impl Debug for Importfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Import[src]
impl PartialEq for Importfn eq(&self, other: &Import) -> bool[src]
fn eq(&self, other: &Import) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Import) -> bool[src]
fn ne(&self, other: &Import) -> boolThis method tests for !=.
impl Eq for Import[src]
impl Eq for Importimpl Hash for Import[src]
impl Hash for Import