Fields§
§style: Style
§fields: Vec<T, Global>
Implementations§
source§impl<T> Fields<T>
impl<T> Fields<T>
pub fn empty_from(vd: &Fields) -> Fields<T>
sourcepub fn split(self) -> (Style, Vec<T, Global>)
pub fn split(self) -> (Style, Vec<T, Global>)
Splits the Fields
into its style and fields for further processing.
Returns an empty Vec
for Unit
data.
sourcepub fn is_newtype(&self) -> bool
pub fn is_newtype(&self) -> bool
Returns true if this variant’s data makes it a newtype.
pub fn is_unit(&self) -> bool
pub fn is_tuple(&self) -> bool
pub fn is_struct(&self) -> bool
pub fn as_ref<'a>(&'a self) -> Fields<&'a T>
pub fn map<F, U>(self, map: F) -> Fields<U>where
F: FnMut(T) -> U,
pub fn iter(&self) -> Iter<'_, T>
Trait Implementations§
source§impl<T> PartialEq<Fields<T>> for Fields<T>where
T: PartialEq<T>,
impl<T> PartialEq<Fields<T>> for Fields<T>where
T: PartialEq<T>,
source§impl<T> UsesLifetimes for Fields<T>where
T: UsesLifetimes,
impl<T> UsesLifetimes for Fields<T>where
T: UsesLifetimes,
source§fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
fn uses_lifetimes<'a>(
&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
source§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.
source§impl<T> UsesTypeParams for Fields<T>where
T: UsesTypeParams,
impl<T> UsesTypeParams for Fields<T>where
T: UsesTypeParams,
source§fn uses_type_params<'a>(
&self,
options: &Options,
type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>
fn uses_type_params<'a>(
&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
source§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.