Struct aggregate_types::Field
source · pub struct Field {
pub attrs: Attributes,
pub inner: Option<Amalgamate>,
}Expand description
Represents a field-level tuple of attributes and an inner structure.
/// This is my struct.
struct MyStruct {
/// This is my field. <--- `attrs` value
my_field: MyInner,
}
/// This is my inner struct. <--- `inner.attrs` value
struct MyInner {
/// My inner field attribute <--- `inner.fields` member
my_inner_field: bool,
}Fields§
§attrs: Attributes§inner: Option<Amalgamate>Trait Implementations§
source§impl ToTokens for Field
impl ToTokens for Field
source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl RefUnwindSafe for Field
impl !Send for Field
impl !Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
Blanket Implementations§
source§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.