pub enum TyDecl {
Show 13 variants
VariableDecl(Box<TyVariableDecl>),
ConstantDecl {
name: Ident,
decl_id: DeclId<TyConstantDecl>,
decl_span: Span,
},
FunctionDecl {
name: Ident,
decl_id: DeclId<TyFunctionDecl>,
subst_list: Template<SubstList>,
decl_span: Span,
},
TraitDecl {
name: Ident,
decl_id: DeclId<TyTraitDecl>,
subst_list: Template<SubstList>,
decl_span: Span,
},
StructDecl {
name: Ident,
decl_id: DeclId<TyStructDecl>,
subst_list: Template<SubstList>,
decl_span: Span,
},
EnumDecl {
name: Ident,
decl_id: DeclId<TyEnumDecl>,
subst_list: Template<SubstList>,
decl_span: Span,
},
EnumVariantDecl {
enum_ref: DeclRefEnum,
variant_name: Ident,
variant_decl_span: Span,
},
ImplTrait {
name: Ident,
decl_id: DeclId<TyImplTrait>,
subst_list: Template<SubstList>,
decl_span: Span,
},
AbiDecl {
name: Ident,
decl_id: DeclId<TyAbiDecl>,
decl_span: Span,
},
GenericTypeForFunctionScope {
name: Ident,
type_id: TypeId,
},
ErrorRecovery(Span),
StorageDecl {
decl_id: DeclId<TyStorageDecl>,
decl_span: Span,
},
TypeAliasDecl {
name: Ident,
decl_id: DeclId<TyTypeAliasDecl>,
decl_span: Span,
},
}
Variants§
VariableDecl(Box<TyVariableDecl>)
ConstantDecl
FunctionDecl
TraitDecl
StructDecl
EnumDecl
EnumVariantDecl
ImplTrait
AbiDecl
GenericTypeForFunctionScope
ErrorRecovery(Span)
StorageDecl
TypeAliasDecl
Implementations§
source§impl TyDecl
impl TyDecl
pub fn get_fun_decl_ref(&self) -> Option<DeclRefFunction>
source§impl TyDecl
impl TyDecl
sourcepub fn friendly_name(&self, engines: &Engines<'_>) -> String
pub fn friendly_name(&self, engines: &Engines<'_>) -> String
friendly name string used for error reporting, which consists of the the identifier for the declaration.
sourcepub fn friendly_type_name(&self) -> &'static str
pub fn friendly_type_name(&self) -> &'static str
friendly type name string used for error reporting, which consists of the type name of the declaration AST node.
Trait Implementations§
source§impl GetDeclIdent for TyDecl
impl GetDeclIdent for TyDecl
fn get_decl_ident(&self) -> Option<Ident>
Auto Trait Implementations§
impl RefUnwindSafe for TyDecl
impl Send for TyDecl
impl Sync for TyDecl
impl Unpin for TyDecl
impl UnwindSafe for TyDecl
Blanket Implementations§
source§impl<T> AnyDebug for Twhere
T: Any + Debug,
impl<T> AnyDebug for Twhere T: Any + Debug,
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.