[−][src]Enum syn::Fields
Data stored within an enum variant or struct.
This type is available if Syn is built with the "derive"
or "full"
feature.
Syntax tree enum
This type is a syntax tree enum.
Variants
Named(FieldsNamed)
Named fields of a struct or struct variant such as Point { x: f64, y: f64 }
.
This type is available if Syn is built with the "derive"
or
"full"
feature.
Unnamed(FieldsUnnamed)
Unnamed fields of a tuple struct or tuple variant such as Some(T)
.
This type is available if Syn is built with the "derive"
or
"full"
feature.
Unit
Unit struct or unit variant such as None
.
Methods
impl Fields
[src]
[−]
impl Fields
ⓘImportant traits for Iter<'a, T>pub fn iter(&self) -> Iter<Field>
[src]
[−]
pub fn iter(&self) -> Iter<Field>
Get an iterator over the borrowed Field
items in this object. This
iterator can be used to iterate over a named or unnamed struct or
variant's fields uniformly.
ⓘImportant traits for IterMut<'a, T>pub fn iter_mut(&mut self) -> IterMut<Field>
[src]
[−]
pub fn iter_mut(&mut self) -> IterMut<Field>
Get an iterator over the mutably borrowed Field
items in this
object. This iterator can be used to iterate over a named or unnamed
struct or variant's fields uniformly.
Trait Implementations
impl PartialEq<Fields> for Fields
[src]
[+]
impl PartialEq<Fields> for Fields
impl Clone for Fields
[src]
[+]
impl Clone for Fields
impl From<FieldsNamed> for Fields
[src]
[+]
impl From<FieldsNamed> for Fields
impl From<FieldsUnnamed> for Fields
[src]
[+]
impl From<FieldsUnnamed> for Fields
impl<'a> IntoIterator for &'a Fields
[src]
[+]
impl<'a> IntoIterator for &'a Fields
impl<'a> IntoIterator for &'a mut Fields
[src]
[+]
impl<'a> IntoIterator for &'a mut Fields
impl Eq for Fields
[src]
impl Eq for Fields
impl Hash for Fields
[src]
[+]
impl Hash for Fields
impl Debug for Fields
[src]
[+]
impl Debug for Fields
impl ToTokens for Fields
[src]
[+]
impl ToTokens for Fields
Auto Trait Implementations
Blanket Implementations
impl<T> Spanned for T where
T: ToTokens,
[src]
[−]
impl<T> Spanned for T where
T: ToTokens,
impl<T> From for T
[src]
[−]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
[−]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
[−]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
[−]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
[−]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
[−]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
[−]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
[−]
fn get_type_id(&self) -> TypeId
impl<T> BorrowMut for T where
T: ?Sized,
[src]
[−]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
[−]
fn borrow_mut(&mut self) -> &mut T
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
[−]
impl<T, U> TryInto for T where
U: TryFrom<T>,