Type Definition sway_core::NamespaceRef

source · []
pub type NamespaceRef = Index;

Trait Implementations

Returns a tuple of all of the fields of a struct and the struct’s name.

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

Pull a single item from a module and import it into this namespace. The item we want to import is basically the last item in path because this is a self import.

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

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