pub(crate) fn generate_reactor(def: &ReactorDefinition) -> TokenStream {
    let reactor_ident = def.reactor_ident();

    let mut reactor_fields = Vec::new();

    for component in def.components() {
        let field_name = component.field_ident();
        let full_type = component.full_component_type();

        reactor_fields.push(quote!(#field_name: #full_type));
    }

    quote!(
        /// Top-level reactor.
        #[derive(Debug)]
        pub(crate) struct #reactor_ident {
            #(#reactor_fields,)*
        }
    )
}
/// Generates the top level reactor `struct`.
///
/// Will generate a field for each component to be used.
Generates the top level reactor `struct`.
Will generate a field for each component to be used.
Generates the top level reactor ` struct ` . Will generate a field for each component to be used .
pub(crate) fn generate_reactor(def: &ReactorDefinition) -> TokenStream {
    let reactor_ident = def.reactor_ident();
    let mut reactor_fields = Vec::new();
    for component in def.components() {
        let field_name = component.field_ident();
        let full_type = component.full_component_type();
        reactor_fields.push(quote!(#field_name: #full_type));
    }
    quote!(
        /// Top-level reactor.
        #[derive(Debug)]
        pub(crate) struct #reactor_ident {
            #(#reactor_fields,)*
        }
    )
}
pub ( crate ) fn generate_reactor ( def : & ReactorDefinition ) -> TokenStream { let reactor_ident = def . reactor_ident ( ) ; let mut reactor_fields = Vec :: new ( ) ; for component in def . components ( ) { let field_name = component . field_ident ( ) ; let full_type = component . full_component_type ( ) ; reactor_fields . push ( quote ! ( field_name full_type ) ) ; } quote ! ( /// Top-level reactor. [ derive ( Debug ) ] pub ( crate ) struct reactor_ident { ( reactor_fields ) } ) }
Generates the top level reactor `struct`.
Generates the top level reactor ` struct ` .
def
&ReactorDefinition
def
&ReactorDefinition