pub enum ImportDecl {
SingleType {
import_span: Span,
path: Path,
semi_span: Span,
},
TypeOnDemand {
import_span: Span,
path: Path,
star_span: Span,
semi_span: Span,
},
SingleStatic {
import_span: Span,
static_span: Span,
path: Path,
member: Ident,
semi_span: Span,
},
StaticOnDemand {
import_span: Span,
static_span: Span,
path: Path,
star_span: Span,
semi_span: Span,
},
}Expand description
An import declaration.
Variants§
SingleType
Single type import: import java.util.List;
TypeOnDemand
Type import on demand: import java.util.*;
SingleStatic
Single static import: import static java.util.Collections.sort;
StaticOnDemand
Static import on demand: import static java.util.Collections.*;
Implementations§
Trait Implementations§
Source§impl Clone for ImportDecl
impl Clone for ImportDecl
Source§fn clone(&self) -> ImportDecl
fn clone(&self) -> ImportDecl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImportDecl
impl Debug for ImportDecl
impl Eq for ImportDecl
Source§impl Hash for ImportDecl
impl Hash for ImportDecl
Source§impl Parse for ImportDecl
impl Parse for ImportDecl
Source§fn parse(input: &ParseStream<'_>) -> Result<Self>
fn parse(input: &ParseStream<'_>) -> Result<Self>
Parse this type from the given
ParseStream.Source§impl PartialEq for ImportDecl
impl PartialEq for ImportDecl
Source§fn eq(&self, other: &ImportDecl) -> bool
fn eq(&self, other: &ImportDecl) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ImportDecl
Auto Trait Implementations§
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