Struct ketos::scope::GlobalScope [] [src]

pub struct GlobalScope { /* fields omitted */ }

Represents the global namespace of an execution context.

Methods

impl GlobalScope
[src]

Creates a new global scope.

Creates a new global scope with the given name and default environment.

Creates a new global scope using the shared data from the given scope.

Creates a semi-"deep" clone of the GlobalScope object.

All constants, macros, and values will be cloned into the new scope.

Other data will be shared between this scope and the new scope.

Adds a named constant value to the scope.

Adds a docstring for the named constant or value.

Adds a macro function to the global scope.

Adds a string representation to the contained NameStore.

Adds a set of imports to the given scope.

Adds a value to the global scope.

Adds a value with the given name to the global scope.

Adds a value to the global scope. The Name value for the given string representation is passed to the given closure to create the value.

Borrows a reference to the contained CodeMap.

Borrows a mutable reference to the contained CodeMap.

Borrows a reference to the contained NameStore.

Borrows a mutable reference to the contained NameStore.

Returns the number of contained constants.

Returns the number of contained macros.

Returns the number of contained values.

Returns a borrowed reference to the contained CodeMap.

Returns a named constant value, if present.

Returns a named constant value, if present.

Returns a borrowed reference to the contained GlobalIo.

Returns a borrowed reference to the contained ModuleRegistry.

Returns the scope's name.

Returns a borrowed reference to the contained NameStore.

Returns whether the scope contains a given exportable name.

Returns whether the scope contains a constant for the given name.

Returns whether the scope contains a macro for the given name.

Returns whether the scope contains a value for the given name.

Returns a macro function for the given name, if present.

Returns a macro function for the given name, if present.

Returns a Value for the given name, if present.

Returns a Value for the given name, if present.

Clones all exported values from a scope into this scope.

Returns whether the given name has been exported in this scope.

Returns whether the given name is imported from another module.

Assigns a set of exported names for this scope.

Calls a closure with a borrowed reference to the named documentation, if present.

Note

When a function is declared with a docstring, that docstring is stored in the compiled Code object rather than the GlobalScope.

Calls a closure with a borrowed reference to the contained docstrings.

Calls a closure with a mutable reference to the contained docstrings.

Calls a closure with an optional reference to the module docstring.

Calls a closure with a mutable reference to the module docstring.

Calls a closure with the borrowed string representation of a name.

Calls a closure with the set of exported names.

Calls a closure with the set of imported values.

Calls a closure with the set of defined constants.

Calls a closure with the set of defined macros.

Calls a closure with the set of defined values.