pub enum ScopeItem {
    Enum {
        token: Enum,
        brace: Brace,
        variants: Punctuated<Variant, Comma>,
    },
    Struct {
        token: Struct,
        fields: Fields,
    },
    Type {
        token: Type,
        eq_token: Eq,
        ty: Box<Type>,
    },
    Union {
        token: Union,
        fields: FieldsNamed,
    },
}
Expand description

Content of items supported by Scope that are not common to all variants

Variants§

§

Enum

Fields

§token: Enum

enum

§brace: Brace

{ ... }

§variants: Punctuated<Variant, Comma>

Variants of enum

A syn::ItemEnum, minus common parts

§

Struct

Fields

§token: Struct

struct

§fields: Fields

Fields of struct

A syn::ItemStruct, minus common parts

Uses custom Fields, supporting field initializers.

§

Type

Fields

§token: Type

type

§eq_token: Eq

=

§ty: Box<Type>

Target type

A syn::ItemType, minus common parts

§

Union

Fields

§token: Union

union

§fields: FieldsNamed

Fields of union

A syn::ItemUnion, minus common parts

Implementations§

Take span of enum/struct/type/union token

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.