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

Construct a PortableRegistry.

Guarantees that the resulting PortableRegistry has the list of types in the correct order, since downstream libs assume that a u32 type id corresponds to the index of the type definition type table.

Implementations§

Register a type, returning the assigned ID.

If the type is already registered it will return the existing ID.

Returns the type id that would be assigned to a newly registered type.

Returns a reference to the type registered at the given ID (if any).

Finalize and return a valid PortableRegistry instance.

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a 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.