fn generate_runtime_api_id(trait_name: &str) -> TokenStream {
	let mut res = [0; 8];
	res.copy_from_slice(blake2_rfc::blake2b::blake2b(8, &[], trait_name.as_bytes()).as_bytes());

	quote!(	const ID: [u8; 8] = [ #( #res ),* ]; )
}
/// Generates the identifier as const variable for the given `trait_name`
/// by hashing the `trait_name`.
Generates the identifier as const variable for the given `trait_name`
by hashing the `trait_name`.
Generates the identifier as const variable for the given ` trait_name ` by hashing the ` trait_name ` .
fn generate_runtime_api_id(trait_name: &str) -> TokenStream {
	let mut res = [0; 8];
	res.copy_from_slice(blake2_rfc::blake2b::blake2b(8, &[], trait_name.as_bytes()).as_bytes());
	quote!(	const ID: [u8; 8] = [ #( #res ),* ]; )
}
fn generate_runtime_api_id ( trait_name : & str ) -> TokenStream { let mut res = [ 0 ; 8 ] ; res . copy_from_slice ( blake2_rfc :: blake2b :: blake2b ( 8 , & [ ] , trait_name . as_bytes ( ) ) . as_bytes ( ) ) ; quote ! ( const ID [ u8 8 ] [ ( res ) ] ) }
Generates the identifier as const variable for the given `trait_name`
by hashing the `trait_name`.
Generates the identifier as const variable for the given ` trait_name ` by hashing the ` trait_name ` .
trait_name
&str
trait_name
&str