fn generate_api_impl_for_runtime(impls: &[ItemImpl]) -> Result<TokenStream> {
	let mut impls_prepared = Vec::new();

	// We put `runtime` before each trait to get the trait that is intended for the runtime and
	// we put the `RuntimeBlock` as first argument for the trait generics.
	for impl_ in impls.iter() {
		let mut impl_ = impl_.clone();
		let trait_ = extract_impl_trait(&impl_)?.clone();
		let trait_ = extend_with_runtime_decl_path(trait_);

		impl_.trait_.as_mut().unwrap().1 = trait_;
		impls_prepared.push(impl_);
	}

	Ok(quote!( #( #impls_prepared )* ))
}
/// Generates the implementations of the apis for the runtime.
Generates the implementations of the apis for the runtime.
Generates the implementations of the apis for the runtime .
fn generate_api_impl_for_runtime(impls: &[ItemImpl]) -> Result<TokenStream> {
	let mut impls_prepared = Vec::new();
	// We put `runtime` before each trait to get the trait that is intended for the runtime and
	// we put the `RuntimeBlock` as first argument for the trait generics.
	for impl_ in impls.iter() {
		let mut impl_ = impl_.clone();
		let trait_ = extract_impl_trait(&impl_)?.clone();
		let trait_ = extend_with_runtime_decl_path(trait_);
		impl_.trait_.as_mut().unwrap().1 = trait_;
		impls_prepared.push(impl_);
	}
	Ok(quote!( #( #impls_prepared )* ))
}
fn generate_api_impl_for_runtime ( impls : & [ ItemImpl ] ) -> Result < TokenStream > { let mut impls_prepared = Vec :: new ( ) ; // We put `runtime` before each trait to get the trait that is intended for the runtime and // we put the `RuntimeBlock` as first argument for the trait generics. for impl_ in impls . iter ( ) { let mut impl_ = impl_ . clone ( ) ; let trait_ = extract_impl_trait ( & impl_ ) ? . clone ( ) ; let trait_ = extend_with_runtime_decl_path ( trait_ ) ; impl_ . trait_ . as_mut ( ) . unwrap ( ) . 1 = trait_ ; impls_prepared . push ( impl_ ) ; } Ok ( quote ! ( ( impls_prepared ) ) ) }
Generates the implementations of the apis for the runtime.
Generates the implementations of the apis for the runtime .
impls
&[ItemImpl]
impls
&[ItemImpl]