Type Definition sway_core::NamespaceRef

source · []
pub type NamespaceRef = Index;

Trait Implementations

Pull a single item from a module and import it into this namespace.

Returns a tuple where the first element is the [ResolvedType] of the actual expression, and the second is the [ResolvedType] of its parent, for control-flow analysis. Read more

given a declaration that may refer to a variable which contains a struct, find that struct’s fields and name for use in determining if a subfield expression is valid e.g. foo.bar.baz is foo a struct? does it contain a field bar? is foo.bar a struct? does foo.bar contain a field baz? this is the problem this function addresses Read more

Used for calls that look like this: foo::bar::function where foo and bar are the prefixes and function is the suffix Read more

Given a path to a module, create synonyms to every symbol in that module. This is used when an import path contains an asterisk. Read more

Given a method and a type (plus a self_type to potentially resolve it), find that method in the namespace. Requires args_buf because of some special casing for the standard library where we pull the type from the arguments buffer. Read more

this function either returns a struct (i.e. custom type), None, denoting the type that is being looked for is actually a generic, not-yet-resolved type. Read more