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 }
.
This type is available only if Syn is built with the "full"
feature.
Fields
attrs: Vec<Attribute>
vis: Visibility
union_token: Union
ident: Ident
generics: Generics
fields: FieldsNamed
Trait Implementations
sourceimpl From<ItemUnion> for DeriveInput
impl From<ItemUnion> for DeriveInput
sourcefn from(input: ItemUnion) -> DeriveInput
fn from(input: ItemUnion) -> DeriveInput
Converts to this type from the input type.
sourceimpl ToTokens for ItemUnion
impl ToTokens for ItemUnion
sourcefn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
sourcefn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
sourcefn into_token_stream(self) -> TokenStream
fn into_token_stream(self) -> TokenStream
impl Eq for ItemUnion
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
sourcefn 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. Read more