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

A collection of types.

Implementations

Add a collection of types that will be used as references. Regardless of how these types are defined–de novo or built-in–each type will appear in the final output as a struct, enum or newtype. This method may be called multiple times, but collections of references must be self-contained; in other words, a type in one invocation may not refer to a type in another invocation.

Add a new type and return a type identifier that may be used in function signatures or embedded within other types.

Add a new type with a name hint and return a the components necessary to use the type for various components of a function signature.

Get a type given its ID.

Set the name of the path prefix for types defined in this TypeSpace.

Add an additional derive macro to apply to all defined types.

Iterate over all types including those defined in this TypeSpace and those referred to by those types.

Common code, shared by types.

All code for processed types.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Converts the given value to a String. 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.