meta

type meta

Since

0.13.5

Constructors

Link copied to clipboard
constructor<T> (type: T)

Construct a value of type rell.meta, which describes a definition.

rell.meta values describe the definition referenced in the argument to their constructor. The referenced definition can be a module, entity, object, operation or query.

Given the following definitions:

operation my_op(...) { ... }
entity my_entity { ... }
object my_object { ... }
query my_query(...) { ... }

one can construct values of type rell.meta by writing rell.meta(my_op), rell.meta(my_entity), rell.meta(my_object) or rell.meta(my_query).

Where an external module is imported:

import other_module;

one can also construct a value of type rell.meta by writing rell.meta(other_module).

Properties

Link copied to clipboard

The full name of the definition represented by this meta value, including the names of the module and namespace in which the definition occurs.

For example, an operation my_op defined in a module a.b.c, and nested inside namespaces n and m (where n is the outermost), would have the full name a.b.c:n.m.my_op.

Where the kind of definition described by this meta value is a module, full_name is equal to module_name.

Link copied to clipboard

Text representing the kind of the definition described by this meta value.

Possible values are module, entity, object, operation and query.

For example, an operation my_op defined in a module a.b.c, would have the kind text operation.

Link copied to clipboard

The name of the module to which the definition represented by this meta value belongs.

For example, an operation my_op defined in a module a.b.c, would have the module name a.b.c.

Where the kind of definition described by this meta value is a module, module_name is equal to full_name.

Link copied to clipboard

The effective mount name of the definition represented by this meta value, determined by:

  • the name of the definition

  • the names of any namespaces in which the definition occurs

  • any @mount annotations on the definition

  • any @mount annotations on any namespaces in which the definition occurs

  • any @mount annotations defined on the module in which the definition occurs, and any of its parent modules

Link copied to clipboard

The simple name of the definition represented by this meta value.

For example, an operation my_op defined in a module a.b.c, and nested inside namespaces n and m (where n is the outermost), would have the simple name my_op.

Where the kind of definition described by this meta value is a module, simple_name is the last part of the module's path; e.g. for a module a.b.c, the simple_name is c.