pub enum Decl<'a> {
Var(VarKind, Vec<VarDecl<'a>>),
Func(Func<'a>),
Class(Class<'a>),
Import(Box<ModImport<'a>>),
Export(Box<ModExport<'a>>),
}
Expand description
The declaration of a variable, function, class, import or export
Variants
Var(VarKind, Vec<VarDecl<'a>>)
A variable declaration
var x, b;
let y, a = 0;
const q = 100
Func(Func<'a>)
A function declaration
function thing() {}
Class(Class<'a>)
A class declaration
class Thing {}
Import(Box<ModImport<'a>>)
An import declaration
import * as moment from 'moment';
import Thing, {thing} from 'stuff';
Export(Box<ModExport<'a>>)
An export declaration
export function thing() {}
Trait Implementations
sourceimpl<'a> PartialEq<Decl<'a>> for Decl<'a>
impl<'a> PartialEq<Decl<'a>> for Decl<'a>
impl<'a> StructuralPartialEq for Decl<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Decl<'a>
impl<'a> Send for Decl<'a>
impl<'a> Sync for Decl<'a>
impl<'a> Unpin for Decl<'a>
impl<'a> UnwindSafe for Decl<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more