What the difference between enum and struct?


The struct define:
pub struct Struct { pub struct_type: StructType, pub generics: Generics, pub fields: Vec<Item>, pub fields_stripped: bool, }
The enum define:
pub struct Enum {
pub variants: Vec,
pub generics: Generics,
pub variants_stripped: bool,
they also have the same trait.
so,I want to know what’s the difference between them?


You might find http://doc.rust-lang.org/nightly/book/structs.html and http://doc.rust-lang.org/nightly/book/enums.html helpful here.