Struct darling_core::ast::VariantData
[−]
[src]
pub struct VariantData<T> { pub style: Style, pub fields: Vec<T>, }
Fields
style: Style
fields: Vec<T>
Methods
impl<T> VariantData<T>
[src]
fn empty_from(vd: &VariantData) -> Self
fn split(self) -> (Style, Vec<T>)
Splits the VariantData
into its style and fields for further processing.
Returns an empty Vec
for Unit
data.
fn is_newtype(&self) -> bool
Returns true if this variant's data makes it a newtype.
fn is_unit(&self) -> bool
fn is_tuple(&self) -> bool
fn is_struct(&self) -> bool
fn as_ref<'a>(&'a self) -> VariantData<&'a T>
fn map<F, U>(self, map: F) -> VariantData<U> where
F: FnMut(T) -> U,
F: FnMut(T) -> U,
impl<F: FromField> VariantData<F>
[src]
fn try_from(data: &VariantData) -> Result<Self>
Trait Implementations
impl<T: Debug> Debug for VariantData<T>
[src]
impl<T: Clone> Clone for VariantData<T>
[src]
fn clone(&self) -> VariantData<T>
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
impl<T: PartialEq> PartialEq for VariantData<T>
[src]
fn eq(&self, __arg_0: &VariantData<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &VariantData<T>) -> bool
This method tests for !=
.