pub struct VariantBuilder<S = IndexNotAssigned> { /* private fields */ }
Expand description

Build a Variant.

Implementations

Create a new VariantBuilder.

Set the variant’s codec index.

Set the variant’s discriminant.

Initialize the variant’s fields.

Doc capture is not enabled via the “docs” feature so this is a no-op.

Initialize the variant’s documentation, always captured even if the “docs” feature is not enabled.

Complete building and create final Variant instance.

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.