fn generate_impl_calls(
	impls: &[ItemImpl],
	input: &Ident
) -> Result<Vec<(Ident, Ident, TokenStream)>> {
	let mut impl_calls = Vec::new();

	for impl_ in impls {
		let impl_trait_path = extract_impl_trait(impl_)?;
		let impl_trait = extend_with_runtime_decl_path(impl_trait_path.clone());
		let impl_trait_ident = &impl_trait_path
			.segments
			.last()
			.ok_or_else(|| Error::new(impl_trait_path.span(), "Empty trait path not possible!"))?
			.value()
			.ident;

		for item in &impl_.items {
			if let ImplItem::Method(method) = item {
				let impl_call = generate_impl_call(
					&method.sig,
					&impl_.self_ty,
					input,
					&impl_trait
				)?;

				impl_calls.push(
					(impl_trait_ident.clone(), method.sig.ident.clone(), impl_call)
				);
			}
		}
	}

	Ok(impl_calls)
}
/// Generate all the implementation calls for the given functions.
Generate all the implementation calls for the given functions.
Generate all the implementation calls for the given functions .
fn generate_impl_calls(
	impls: &[ItemImpl],
	input: &Ident
) -> Result<Vec<(Ident, Ident, TokenStream)>> {
	let mut impl_calls = Vec::new();
	for impl_ in impls {
		let impl_trait_path = extract_impl_trait(impl_)?;
		let impl_trait = extend_with_runtime_decl_path(impl_trait_path.clone());
		let impl_trait_ident = &impl_trait_path
			.segments
			.last()
			.ok_or_else(|| Error::new(impl_trait_path.span(), "Empty trait path not possible!"))?
			.value()
			.ident;
		for item in &impl_.items {
			if let ImplItem::Method(method) = item {
				let impl_call = generate_impl_call(
					&method.sig,
					&impl_.self_ty,
					input,
					&impl_trait
				)?;
				impl_calls.push(
					(impl_trait_ident.clone(), method.sig.ident.clone(), impl_call)
				);
			}
		}
	}
	Ok(impl_calls)
}
fn generate_impl_calls ( impls : & [ ItemImpl ] , input : & Ident ) -> Result < Vec < ( Ident , Ident , TokenStream ) > > { let mut impl_calls = Vec :: new ( ) ; for impl_ in impls { let impl_trait_path = extract_impl_trait ( impl_ ) ? ; let impl_trait = extend_with_runtime_decl_path ( impl_trait_path . clone ( ) ) ; let impl_trait_ident = & impl_trait_path . segments . last ( ) . ok_or_else ( | | Error :: new ( impl_trait_path . span ( ) , " " ) ) ? . value ( ) . ident ; for item in & impl_ . items { if let ImplItem :: Method ( method ) = item { let impl_call = generate_impl_call ( & method . sig , & impl_ . self_ty , input , & impl_trait ) ? ; impl_calls . push ( ( impl_trait_ident . clone ( ) , method . sig . ident . clone ( ) , impl_call ) ) ; } } } Ok ( impl_calls ) }
Generate all the implementation calls for the given functions.
Generate all the implementation calls for the given functions .
impls
&[ItemImpl]
input
&Ident
impls
&[ItemImpl]
input
&Ident