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

Used to build a Methods value.

Implementations

Create an empty MethodsBuilder, with no functions in scope.

Called at the end to build a Methods.

A fluent API for modifying MethodsBuilder and returning the result.

Set the raw docstring for this object.

Set a constant value in the MethodsBuilder that will be suitable for use with StarlarkValue::get_methods.

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

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 MethodsBuilder

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.