Enum syn::VariantData [−][src]
Data stored within an enum variant or struct.
Variants
Struct(Vec<Field>)
Struct variant, e.g. Point { x: f64, y: f64 }
.
Tuple(Vec<Field>)
Tuple variant, e.g. Some(T)
.
Unit
Unit variant, e.g. None
.
Methods
impl VariantData
[src]
impl VariantData
pub fn fields(&self) -> &[Field]
[src]
pub fn fields(&self) -> &[Field]
Slice containing the fields stored in the variant.
pub fn fields_mut(&mut self) -> &mut [Field]
[src]
pub fn fields_mut(&mut self) -> &mut [Field]
Mutable slice containing the fields stored in the variant.
Trait Implementations
impl ToTokens for VariantData
[src]
impl ToTokens for VariantData
impl Debug for VariantData
[src]
impl Debug for VariantData
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for VariantData
[src]
impl Clone for VariantData
fn clone(&self) -> VariantData
[src]
fn clone(&self) -> VariantData
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Eq for VariantData
[src]
impl Eq for VariantData
impl PartialEq for VariantData
[src]
impl PartialEq for VariantData
fn eq(&self, other: &VariantData) -> bool
[src]
fn eq(&self, other: &VariantData) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &VariantData) -> bool
[src]
fn ne(&self, other: &VariantData) -> bool
This method tests for !=
.
impl Hash for VariantData
[src]
impl Hash for VariantData
Auto Trait Implementations
impl Send for VariantData
impl Send for VariantData
impl Sync for VariantData
impl Sync for VariantData