pub struct TypeBuilder<'a, T: Variant + Clone> { /* private fields */ }
👎Deprecated:

This type is NOT deprecated, but it is considered volatile and may change in the future.

Expand description

Builder to build the API of a custom type for use with an Engine.

The type is automatically registered when this builder is dropped.

Pretty-Print Name

By default the type is registered with Engine::register_type (i.e. without a pretty-print name).

To define a pretty-print name, call with_name, to use Engine::register_type_with_name instead.

Implementations

Set a pretty-print name for the type_of function.

Register a custom function.

Register a custom fallible function.

Register a type iterator. This is an advanced API.

Register a getter function.

The function signature must start with &mut self and not &self.

Not available under no_object.

Register a fallible getter function.

The function signature must start with &mut self and not &self.

Not available under no_object.

Register a setter function.

Not available under no_object.

Register a fallible setter function.

Not available under no_object.

Short-hand for registering both getter and setter functions.

All function signatures must start with &mut self and not &self.

Not available under no_object.

Register an index getter.

The function signature must start with &mut self and not &self.

Not available under both no_index and no_object.

Register an fallible index getter.

The function signature must start with &mut self and not &self.

Not available under both no_index and no_object.

Register an index setter.

Not available under both no_index and no_object.

Register an fallible index setter.

Not available under both no_index and no_object.

Short-hand for registering both index getter and setter functions.

Not available under both no_index and no_object.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

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.

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.