Struct sway_core::declaration_engine::DeclarationEngine
source · pub struct DeclarationEngine { /* private fields */ }
Expand description
Used inside of type inference to store declarations.
Implementations§
source§impl DeclarationEngine
impl DeclarationEngine
pub fn get_function(
&self,
index: DeclarationId,
span: &Span
) -> Result<TyFunctionDeclaration, CompileError>
pub fn get_trait(
&self,
index: DeclarationId,
span: &Span
) -> Result<TyTraitDeclaration, CompileError>
pub fn get_trait_fn(
&self,
index: DeclarationId,
span: &Span
) -> Result<TyTraitFn, CompileError>
pub fn get_impl_trait(
&self,
index: DeclarationId,
span: &Span
) -> Result<TyImplTrait, CompileError>
pub fn get_struct(
&self,
index: DeclarationId,
span: &Span
) -> Result<TyStructDeclaration, CompileError>
pub fn get_storage(
&self,
index: DeclarationId,
span: &Span
) -> Result<TyStorageDeclaration, CompileError>
pub fn get_abi(
&self,
index: DeclarationId,
span: &Span
) -> Result<TyAbiDeclaration, CompileError>
pub fn get_constant(
&self,
index: DeclarationId,
span: &Span
) -> Result<TyConstantDeclaration, CompileError>
pub fn get_enum(
&self,
index: DeclarationId,
span: &Span
) -> Result<TyEnumDeclaration, CompileError>
Trait Implementations§
source§impl Clone for DeclarationEngine
impl Clone for DeclarationEngine
source§impl Debug for DeclarationEngine
impl Debug for DeclarationEngine
source§impl Default for DeclarationEngine
impl Default for DeclarationEngine
source§fn default() -> DeclarationEngine
fn default() -> DeclarationEngine
Returns the “default value” for a type. Read more