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 PartialEq for ItemUnion
impl PartialEq for ItemUnion
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,
impl Eq for ItemUnion
Auto Trait Implementations§
impl Freeze for ItemUnion
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.