pub fn fold_fn_decl_for_client_side(
	mut input: FnDecl,
	block_id: &TokenStream,
	crate_: &TokenStream
) -> FnDecl {
	// Add `&self, at:& BlockId` as parameters to each function at the beginning.
	input.inputs.insert(0, parse_quote!( at: &#block_id ));
	input.inputs.insert(0, parse_quote!( &self ));

	// Wrap the output in a `Result`
	input.output = {
		let ty = return_type_extract_type(&input.output);
		parse_quote!( -> ::std::result::Result<#ty, #crate_::error::Error> )
	};

	input
}
/// Fold the given `FnDecl` to make it usable on the client side.
Fold the given `FnDecl` to make it usable on the client side.
Fold the given ` FnDecl ` to make it usable on the client side .
pub fn fold_fn_decl_for_client_side(
	mut input: FnDecl,
	block_id: &TokenStream,
	crate_: &TokenStream
) -> FnDecl {
	// Add `&self, at:& BlockId` as parameters to each function at the beginning.
	input.inputs.insert(0, parse_quote!( at: &#block_id ));
	input.inputs.insert(0, parse_quote!( &self ));
	// Wrap the output in a `Result`
	input.output = {
		let ty = return_type_extract_type(&input.output);
		parse_quote!( -> ::std::result::Result<#ty, #crate_::error::Error> )
	};
	input
}
pub fn fold_fn_decl_for_client_side ( mut input : FnDecl , block_id : & TokenStream , crate_ : & TokenStream ) -> FnDecl { // Add `&self, at:& BlockId` as parameters to each function at the beginning. input . inputs . insert ( 0 , parse_quote ! ( at block_id ) ) ; input . inputs . insert ( 0 , parse_quote ! ( self ) ) ; // Wrap the output in a `Result` input . output = { let ty = return_type_extract_type ( & input . output ) ; parse_quote ! ( std result Result ty crate_ error Error ) } ; input }
Fold the given `FnDecl` to make it usable on the client side.
Fold the given ` FnDecl ` to make it usable on the client side .
input
FnDecl
block_id
&TokenStream
crate_
&TokenStream
input
FnDecl
block_id
&TokenStream
crate_
&TokenStream