Struct darling::ast::Fields [−][src]
Expand description
Equivalent to syn::Fields
, but replaces the AST element with a generic.
Fields
style: Style
fields: Vec<T, Global>
Implementations
Splits the Fields
into its style and fields for further processing.
Returns an empty Vec
for Unit
data.
Returns true if this variant’s data makes it a newtype.
Trait Implementations
pub fn uses_lifetimes(
&self,
options: &Options,
lifetimes: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
pub fn uses_lifetimes(
&self,
options: &Options,
lifetimes: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
Returns the subset of the queried lifetimes that are used by the implementing syntax element. Read more
fn uses_lifetimes_cloned(
&self,
options: &Options,
lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
fn uses_lifetimes_cloned(
&self,
options: &Options,
lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
Find all used lifetimes, then clone them and return that set.
pub fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
pub fn uses_type_params(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
Returns the subset of the queried type parameters that are used by the implementing syntax element. Read more
fn uses_type_params_cloned(
&self,
options: &Options,
type_set: &HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<Ident, BuildHasherDefault<FnvHasher>>
fn uses_type_params_cloned(
&self,
options: &Options,
type_set: &HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<Ident, BuildHasherDefault<FnvHasher>>
Find all type params using uses_type_params
, then clone the found values and return the set.
Auto Trait Implementations
impl<T> RefUnwindSafe for Fields<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Fields<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<'i, I, T> CollectLifetimes for T where
T: IntoIterator<Item = &'i I>,
I: 'i + UsesLifetimes,
impl<'i, I, T> CollectLifetimes for T where
T: IntoIterator<Item = &'i I>,
I: 'i + UsesLifetimes,
pub fn collect_lifetimes(
self,
options: &Options,
lifetimes: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
pub fn collect_lifetimes(
self,
options: &Options,
lifetimes: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
Consume an iterator, accumulating all lifetimes in the elements which occur in lifetimes
.
pub fn collect_lifetimes_cloned(
self,
options: &Options,
lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
pub fn collect_lifetimes_cloned(
self,
options: &Options,
lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
Consume an iterator using collect_lifetimes
, then clone all found lifetimes and return that set.
impl<'i, T, I> CollectTypeParams for T where
T: IntoIterator<Item = &'i I>,
I: 'i + UsesTypeParams,
impl<'i, T, I> CollectTypeParams for T where
T: IntoIterator<Item = &'i I>,
I: 'i + UsesTypeParams,
pub fn collect_type_params(
self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
pub fn collect_type_params(
self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
Consume an iterator, accumulating all type parameters in the elements which occur in type_set
.
pub fn collect_type_params_cloned(
self,
options: &Options,
type_set: &HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<Ident, BuildHasherDefault<FnvHasher>>
pub fn collect_type_params_cloned(
self,
options: &Options,
type_set: &HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<Ident, BuildHasherDefault<FnvHasher>>
Consume an iterator using collect_type_params
, then clone all found type params and return that set.
Returns a Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty. Read more