Struct unrest_tmp_syn::Variant
[−]
[src]
pub struct Variant { pub ident: Ident, pub attrs: Vec<Attribute>, pub data: VariantData, pub discriminant: Option<Expr>, pub eq_token: Option<Eq>, }
An enum variant.
Fields
ident: Ident
Name of the variant.
attrs: Vec<Attribute>
Attributes tagged on the variant.
data: VariantData
Type of variant.
discriminant: Option<Expr>
Explicit discriminant, e.g. Foo = 1
eq_token: Option<Eq>
Trait Implementations
impl ToTokens for Variant
[src]
fn to_tokens(&self, tokens: &mut Tokens)
Write self
to the given Tokens
. Read more
fn into_tokens(self) -> Tokens
Convert self
directly into a Tokens
object. Read more
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