Struct darling_core::ast::Fields [−][src]
Equivalent to syn::Fields
, but replaces the AST element with a generic.
Fields
style: Style
fields: Vec<T>
Implementations
impl<T> Fields<T>
[src]
pub fn empty_from(vd: &Fields) -> Self
[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>(&'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: FromField> Fields<F>
[src]
Trait Implementations
impl<T: Clone> Clone for Fields<T>
[src]
impl<T: Debug> Debug for Fields<T>
[src]
impl<T: Eq> Eq for Fields<T>
[src]
impl<T, U: Into<Vec<T>>> From<(Style, U)> for Fields<T>
[src]
impl<T> From<Style> for Fields<T>
[src]
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) -> Self::IntoIter
[src]
impl<T: PartialEq> PartialEq<Fields<T>> for Fields<T>
[src]
impl<T> StructuralEq for Fields<T>
[src]
impl<T> StructuralPartialEq for Fields<T>
[src]
impl<T: UsesLifetimes> UsesLifetimes for Fields<T>
[src]
fn uses_lifetimes<'a>(
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
[src]
&self,
options: &Options,
lifetimes: &'a LifetimeSet
) -> LifetimeRefSet<'a>
fn uses_lifetimes_cloned(
&self,
options: &Options,
lifetimes: &LifetimeSet
) -> LifetimeSet
[src]
&self,
options: &Options,
lifetimes: &LifetimeSet
) -> LifetimeSet
impl<T: UsesTypeParams> UsesTypeParams for Fields<T>
[src]
fn uses_type_params<'a>(
&self,
options: &Options,
type_set: &'a IdentSet
) -> IdentRefSet<'a>
[src]
&self,
options: &Options,
type_set: &'a IdentSet
) -> IdentRefSet<'a>
fn uses_type_params_cloned(
&self,
options: &Options,
type_set: &IdentSet
) -> IdentSet
[src]
&self,
options: &Options,
type_set: &IdentSet
) -> IdentSet
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<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,