fn generate_client_side_decls(decls: &[ItemTrait]) -> TokenStream {
	let mut result = Vec::new();

	for decl in decls {
		let decl = decl.clone();

		let crate_ = generate_crate_access(HIDDEN_INCLUDES_ID);
		let block_id = quote!( #crate_::runtime_api::BlockId<Block> );
		let mut found_attributes = HashMap::new();
		let mut errors = Vec::new();
		let trait_ = decl.ident.clone();

		let decl = {
			let mut to_client_side = ToClientSideDecl {
				crate_: &crate_,
				block_id: &block_id,
				found_attributes: &mut found_attributes,
				errors: &mut errors,
				trait_: &trait_,
			};
			to_client_side.fold_item_trait(decl)
		};

		let api_version = get_api_version(&found_attributes);

		let runtime_info = unwrap_or_error(
			api_version.map(|v| generate_runtime_info_impl(&decl, v))
		);

		result.push(quote!( #decl #runtime_info #( #errors )* ));
	}

	quote!( #( #result )* )
}
/// Generate the declaration of the trait for the client side.
Generate the declaration of the trait for the client side.
Generate the declaration of the trait for the client side .
fn generate_client_side_decls(decls: &[ItemTrait]) -> TokenStream {
	let mut result = Vec::new();
	for decl in decls {
		let decl = decl.clone();
		let crate_ = generate_crate_access(HIDDEN_INCLUDES_ID);
		let block_id = quote!( #crate_::runtime_api::BlockId<Block> );
		let mut found_attributes = HashMap::new();
		let mut errors = Vec::new();
		let trait_ = decl.ident.clone();
		let decl = {
			let mut to_client_side = ToClientSideDecl {
				crate_: &crate_,
				block_id: &block_id,
				found_attributes: &mut found_attributes,
				errors: &mut errors,
				trait_: &trait_,
			};
			to_client_side.fold_item_trait(decl)
		};
		let api_version = get_api_version(&found_attributes);
		let runtime_info = unwrap_or_error(
			api_version.map(|v| generate_runtime_info_impl(&decl, v))
		);
		result.push(quote!( #decl #runtime_info #( #errors )* ));
	}
	quote!( #( #result )* )
}
fn generate_client_side_decls ( decls : & [ ItemTrait ] ) -> TokenStream { let mut result = Vec :: new ( ) ; for decl in decls { let decl = decl . clone ( ) ; let crate_ = generate_crate_access ( HIDDEN_INCLUDES_ID ) ; let block_id = quote ! ( crate_ runtime_api BlockId Block ) ; let mut found_attributes = HashMap :: new ( ) ; let mut errors = Vec :: new ( ) ; let trait_ = decl . ident . clone ( ) ; let decl = { let mut to_client_side = ToClientSideDecl { crate_ : & crate_ , block_id : & block_id , found_attributes : & mut found_attributes , errors : & mut errors , trait_ : & trait_ , } ; to_client_side . fold_item_trait ( decl ) } ; let api_version = get_api_version ( & found_attributes ) ; let runtime_info = unwrap_or_error ( api_version . map ( | v | generate_runtime_info_impl ( & decl , v ) ) ) ; result . push ( quote ! ( decl runtime_info ( errors ) ) ) ; } quote ! ( ( result ) ) }
Generate the declaration of the trait for the client side.
Generate the declaration of the trait for the client side .
decls
&[ItemTrait]
decls
&[ItemTrait]