pub enum DeclInfo {
Const(DeclInfoConst),
Var(DeclInfoVar),
Type(DeclInfoType),
Func(DeclInfoFunc),
}
Expand description
DeclInfo describes a package-level const, type, var, or func declaration.
Variants§
Implementations§
source§impl DeclInfo
impl DeclInfo
pub fn new_const( file_scope: ScopeKey, typ: Option<Expr>, init: Option<Expr> ) -> DeclInfo
pub fn new_var( file_scope: ScopeKey, lhs: Option<Vec<ObjKey>>, typ: Option<Expr>, init: Option<Expr> ) -> DeclInfo
pub fn new_type(file_scope: ScopeKey, typ: Expr, alias: bool) -> DeclInfo
pub fn new_func(file_scope: ScopeKey, fdecl: FuncDeclKey) -> DeclInfo
pub fn as_const(&self) -> &DeclInfoConst
pub fn as_var(&self) -> &DeclInfoVar
pub fn as_type(&self) -> &DeclInfoType
pub fn as_func(&self) -> &DeclInfoFunc
pub fn file_scope(&self) -> &ScopeKey
pub fn deps(&self) -> &HashSet<ObjKey>
pub fn deps_mut(&mut self) -> &mut HashSet<ObjKey>
pub fn add_dep(&mut self, okey: ObjKey)
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DeclInfo
impl !Send for DeclInfo
impl !Sync for DeclInfo
impl Unpin for DeclInfo
impl UnwindSafe for DeclInfo
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