Struct darling::ast::Fields [−][src]
Equivalent to syn::Fields
, but replaces the AST element with a generic.
Fields
style: Style
fields: Vec<T, Global>
Implementations
impl<T> Fields<T>
[src]
impl<T> Fields<T>
[src]pub fn empty_from(vd: &Fields) -> Fields<T>
[src]
pub fn split(self) -> (Style, Vec<T, Global>)
[src]
Splits the Fields
into its style and fields for further processing.
Returns an empty Vec
for Unit
data.
pub fn is_newtype(&self) -> bool
[src]
Returns true if this variant’s data makes it a newtype.
pub fn is_unit(&self) -> bool
[src]
pub fn is_tuple(&self) -> bool
[src]
pub fn is_struct(&self) -> bool
[src]
pub fn as_ref(&'a self) -> Fields<&'a T>
[src]
pub fn map<F, U>(self, map: F) -> Fields<U> where
F: FnMut(T) -> U,
[src]
F: FnMut(T) -> U,
pub fn iter(&self) -> Iter<'_, T>
[src]
pub fn len(&self) -> usize
[src]
Returns the number of fields in the structure.
pub fn is_empty(&self) -> bool
[src]
Returns true
if the Fields
contains no fields.
impl<F> Fields<F> where
F: FromField,
[src]
impl<F> Fields<F> where
F: FromField,
[src]Trait Implementations
impl<T> IntoIterator for Fields<T>
[src]
impl<T> IntoIterator for Fields<T>
[src]impl<T> UsesLifetimes for Fields<T> where
T: UsesLifetimes,
[src]
impl<T> UsesLifetimes for Fields<T> where
T: UsesLifetimes,
[src]pub fn uses_lifetimes(
&self,
options: &Options,
lifetimes: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
lifetimes: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
pub fn uses_lifetimes_cloned(
&self,
options: &Options,
lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
impl<T> UsesTypeParams for Fields<T> where
T: UsesTypeParams,
[src]
impl<T> UsesTypeParams for Fields<T> where
T: UsesTypeParams,
[src]pub fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
pub fn uses_type_params_cloned(
&self,
options: &Options,
type_set: &HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<Ident, BuildHasherDefault<FnvHasher>>
[src]
&self,
options: &Options,
type_set: &HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<Ident, BuildHasherDefault<FnvHasher>>
impl<T> Eq for Fields<T> where
T: Eq,
[src]
T: Eq,
impl<T> StructuralEq for Fields<T>
[src]
impl<T> StructuralPartialEq for Fields<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Fields<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Fields<T> where
T: Send,
T: Send,
impl<T> Sync for Fields<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Fields<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Fields<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<'i, I, T> CollectLifetimes for T where
T: IntoIterator<Item = &'i I>,
I: 'i + UsesLifetimes,
[src]
impl<'i, I, T> CollectLifetimes for T where
T: IntoIterator<Item = &'i I>,
I: 'i + UsesLifetimes,
[src]pub fn collect_lifetimes(
self,
options: &Options,
lifetimes: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
[src]
self,
options: &Options,
lifetimes: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
pub fn collect_lifetimes_cloned(
self,
options: &Options,
lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
[src]
self,
options: &Options,
lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
impl<'i, T, I> CollectTypeParams for T where
T: IntoIterator<Item = &'i I>,
I: 'i + UsesTypeParams,
[src]
impl<'i, T, I> CollectTypeParams for T where
T: IntoIterator<Item = &'i I>,
I: 'i + UsesTypeParams,
[src]pub fn collect_type_params(
self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
[src]
self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
pub fn collect_type_params_cloned(
self,
options: &Options,
type_set: &HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<Ident, BuildHasherDefault<FnvHasher>>
[src]
self,
options: &Options,
type_set: &HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<Ident, BuildHasherDefault<FnvHasher>>