pub struct ItemUnion {
pub attrs: Vec<Attribute>,
pub vis: Visibility,
pub union_token: Union,
pub ident: Ident,
pub generics: Generics,
pub fields: FieldsNamed,
}
Expand description
A union definition: union Foo<A, B> { x: A, y: B }
.
Fields§
§attrs: Vec<Attribute>
§vis: Visibility
§union_token: Union
§ident: Ident
§generics: Generics
§fields: FieldsNamed
Trait Implementations§
source§impl From<ItemUnion> for DeriveInput
impl From<ItemUnion> for DeriveInput
source§fn from(input: ItemUnion) -> DeriveInput
fn from(input: ItemUnion) -> DeriveInput
Converts to this type from the input type.
source§impl ToTokens for ItemUnion
impl ToTokens for ItemUnion
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 ItemUnion
impl !Send for ItemUnion
impl !Sync for ItemUnion
impl Unpin for ItemUnion
impl UnwindSafe for ItemUnion
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.