pub enum ItemEnum {
Show 23 variants Module(Module), ExternCrate { name: String, rename: Option<String>, }, Import(Import), Union(Union), Struct(Struct), StructField(Type), Enum(Enum), Variant(Variant), Function(Function), Trait(Trait), TraitAlias(TraitAlias), Method(Method), Impl(Impl), Typedef(Typedef), OpaqueTy(OpaqueTy), Constant(Constant), Static(Static), ForeignType, Macro(String), ProcMacro(ProcMacro), PrimitiveType(String), AssocConst { type_: Type, default: Option<String>, }, AssocType { generics: Generics, bounds: Vec<GenericBound>, default: Option<Type>, },
}

Variants

Module(Module)

ExternCrate

Fields

name: String
rename: Option<String>

Import(Import)

Union(Union)

Struct(Struct)

StructField(Type)

Enum(Enum)

Variant(Variant)

Function(Function)

Trait(Trait)

TraitAlias(TraitAlias)

Method(Method)

Impl(Impl)

Typedef(Typedef)

OpaqueTy(OpaqueTy)

Constant(Constant)

Static(Static)

ForeignType

types from an extern block

Macro(String)

Declarative macro_rules! macro

ProcMacro(ProcMacro)

PrimitiveType(String)

AssocConst

Fields

type_: Type
default: Option<String>

e.g. const X: usize = 5;

AssocType

Fields

generics: Generics
bounds: Vec<GenericBound>
default: Option<Type>

e.g. type X = usize;

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. 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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 368 bytes

Size for each variant:

  • Module: 32 bytes
  • ExternCrate: 48 bytes
  • Import: 80 bytes
  • Union: 104 bytes
  • Struct: 104 bytes
  • StructField: 104 bytes
  • Enum: 104 bytes
  • Variant: 56 bytes
  • Function: 224 bytes
  • Trait: 128 bytes
  • TraitAlias: 72 bytes
  • Method: 232 bytes
  • Impl: 368 bytes
  • Typedef: 152 bytes
  • OpaqueTy: 72 bytes
  • Constant: 160 bytes
  • Static: 136 bytes
  • ForeignType: 0 bytes
  • Macro: 24 bytes
  • ProcMacro: 32 bytes
  • PrimitiveType: 24 bytes
  • AssocConst: 128 bytes
  • AssocType: 176 bytes