Struct macrohelper::bodykind::enumerator::Variant
[−]
[src]
pub struct Variant { pub name: String, pub data: Structure, }
Representation of an Enum
Enum's are really just a union (shared memory) while what is stored in that type is really just a question of what variation of that data the enum currently is.
Therefore this just stores a name, and a reference to the structure
Fields
name: String
data: Structure
Methods
impl Variant
[src]
fn from_syn_variant(x: &SynVariant) -> Result<Variant, String>
Build from syn
's Variant type
fn get_name<'a>(&'a self) -> &'a str
Eaiser to get name
Trait Implementations
impl Clone for Variant
[src]
fn clone(&self) -> Variant
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more