struct AssignStructuralExpansion<'i> {
trait_ty: Ident,
method_ident: Ident,
self_ty: (&'i Ident, &'i Generics),
variants: Vec<(Option<&'i Ident>, &'i Fields, HashSet<usize, DeterministicState>)>,
is_enum: bool,
}Expand description
Expansion of a macro for generating a structural trait implementation with a &mut self method
receiver for an enum or a struct.
Fields§
§trait_ty: Identsyn::Ident of the implemented trait.
method_ident: Identsyn::Ident and syn::Receiver of the implemented method in trait.
self_ty: (&'i Ident, &'i Generics)syn::Ident and syn::Generics of the implementor enum/struct.
variants: Vec<(Option<&'i Ident>, &'i Fields, HashSet<usize, DeterministicState>)>syn::Fields of the enum/struct to be used in this AssignStructuralExpansion.
is_enum: boolIndicator whether this expansion is for an enum.
Implementations§
Source§impl AssignStructuralExpansion<'_>
impl AssignStructuralExpansion<'_>
Sourcefn body(&self) -> TokenStream
fn body(&self) -> TokenStream
Generates body of the method implementation for this StructuralExpansion.
Trait Implementations§
Source§impl ToTokens for AssignStructuralExpansion<'_>
impl ToTokens for AssignStructuralExpansion<'_>
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<'i> Freeze for AssignStructuralExpansion<'i>
impl<'i> RefUnwindSafe for AssignStructuralExpansion<'i>
impl<'i> !Send for AssignStructuralExpansion<'i>
impl<'i> !Sync for AssignStructuralExpansion<'i>
impl<'i> Unpin for AssignStructuralExpansion<'i>
impl<'i> UnwindSafe for AssignStructuralExpansion<'i>
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 T
impl<T> Spanned for T
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.