[−][src]Struct darling::ast::Fields
Equivalent to syn::Fields
, but replaces the AST element with a generic.
Fields
style: Style
fields: Vec<T>
Methods
impl<T> Fields<T>
[src]
pub fn empty_from(vd: &Fields) -> Fields<T>
[src]
pub fn split(self) -> (Style, Vec<T>)
[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]
F: FromField,
Trait Implementations
impl<T> IntoIterator for Fields<T>
[src]
type Item = T
The type of the elements being iterated over.
type IntoIter = IntoIter<T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> <Fields<T> as IntoIterator>::IntoIter
[src]
impl<T> PartialEq<Fields<T>> for Fields<T> where
T: PartialEq<T>,
[src]
T: PartialEq<T>,
impl<T> Clone for Fields<T> where
T: Clone,
[src]
T: Clone,
fn clone(&self) -> Fields<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T, U> From<(Style, U)> for Fields<T> where
U: Into<Vec<T>>,
[src]
U: Into<Vec<T>>,
impl<T> From<Style> for Fields<T>
[src]
impl<T> Debug for Fields<T> where
T: Debug,
[src]
T: Debug,
impl<T> Eq for Fields<T> where
T: Eq,
[src]
T: Eq,
impl<T> UsesTypeParams for Fields<T> where
T: UsesTypeParams,
[src]
T: UsesTypeParams,
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>>
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>>
Find all type params using uses_type_params
, then clone the found values and return the set.
impl<T> UsesLifetimes for Fields<T> where
T: UsesLifetimes,
[src]
T: UsesLifetimes,
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>>
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>>
Find all used lifetimes, then clone them and return that set.
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<'i, I, T> CollectLifetimes for T where
I: 'i + UsesLifetimes,
T: IntoIterator<Item = &'i I>,
[src]
I: 'i + UsesLifetimes,
T: IntoIterator<Item = &'i I>,
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>>
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
I: 'i + UsesTypeParams,
T: IntoIterator<Item = &'i I>,
[src]
I: 'i + UsesTypeParams,
T: IntoIterator<Item = &'i I>,
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>>
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>>