pub enum FieldKind {
    Tuple {
        idx: usize,
    },
    Named {
        name: &'static str,
    },
    EnumTuple {
        idx: usize,
        assoc_var: Variant,
    },
    EnumNamed {
        name: &'static str,
        assoc_var: Variant,
    },
}
Expand description

Info about different kinds of Fields

Variants

Tuple

Fields

idx: usize

The index of this field

A tuple field, accessed by numeric index

Named

Fields

name: &'static str

The name of this field

A named field, accessed by textual name

EnumTuple

Fields

idx: usize

The index of this field

assoc_var: Variant

The variant of this field

An enum tuple field, accessed by variant and numeric index

EnumNamed

Fields

name: &'static str

The name of this field

assoc_var: Variant

The variant of this field

An enum named field, accessed by variant and textual name

Trait Implementations

Formats the value using the given formatter. 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.