/// Return a Payload using the given hash function and a `BlockPayload`.
Return a Payload using the given hash function and a `BlockPayload`.
Return a Payload using the given hash function and a ` BlockPayload ` .
pub fn new<F: FnOnce(&BlockPayload) -> CryptoHashOf<BlockPayload> + Send + 'static>(
        hash_func: F,
        payload: BlockPayload,
    ) -> Self {
        Self {
            payload_type: payload.payload_type(),
            payload: Arc::new(Hashed::new(
                move |thunk: &Thunk<BlockPayload>| hash_func(thunk.as_ref()),
                Thunk::from(payload),
            )),
        }
    }
pub fn new < F : FnOnce ( & BlockPayload ) -> CryptoHashOf < BlockPayload > + Send + ' static > ( hash_func : F , payload : BlockPayload , ) -> Self { Self { payload_type : payload . payload_type ( ) , payload : Arc :: new ( Hashed :: new ( move | thunk : & Thunk < BlockPayload > | hash_func ( thunk . as_ref ( ) ) , Thunk :: from ( payload ) , ) ) , } }
Return a Payload using the given hash function and a `BlockPayload`.
Return a Payload using the given hash function and a ` BlockPayload ` .
hash_func
F
payload
BlockPayload