pub struct GlobalsBuilder { /* private fields */ }
Expand description

Used to build a Globals value.

Implementations

Create an empty GlobalsBuilder, with no functions in scope.

Create a GlobalsBuilder following the Starlark standard.

Create a GlobalsBuilder combining those functions in the Starlark standard plus all those defined in LibraryExtension.

Create a GlobalsBuilder combining those functions in the Starlark standard plus all those defined in LibraryExtension.

Add a nested struct to the builder. If f adds the definition foo, it will end up on a struct name, accessible as name.foo. This function cannot be called recursively from inside f.

A fluent API for modifying GlobalsBuilder and returning the result.

A fluent API for modifying GlobalsBuilder using struct_.

Called at the end to build a Globals.

Set a value in the GlobalsBuilder.

Set a method. This function is usually called from code generated by starlark_derive and rarely needs to be called manually.

Allocate a value using the same underlying heap as the GlobalsBuilder, only intended for values that are referred to by those which are passed to set.

Set per module docstring.

This function is called by the starlark_derive generated code and rarely needs to be called manually.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Get an ARef pointing at this type.

Try and get an ARef pointing at this type. Returns an Err if the type Self is a RefCell which is already mutably borrowed. Read more

Return the underlying RefCell if Self is one, otherwise None.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert between two equal types.

Convert between references to two equal types.

Convert between mutable references to two equal types.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.