/// Return a Payload with the given hash, and an intialization function that
/// will be use for lazily loading the actual `BlockPayload` matching
/// the given hash. This function does not check if the eventually loaded
/// `BlockPayload` with match the given hash, so it must be used with care.
Return a Payload with the given hash, and an intialization function that
will be use for lazily loading the actual `BlockPayload` matching
the given hash. This function does not check if the eventually loaded
`BlockPayload` with match the given hash, so it must be used with care.
Return a Payload with the given hash and an intialization function that will be use for lazily loading the actual ` BlockPayload ` matching the given hash . This function does not check if the eventually loaded ` BlockPayload ` with match the given hash so it must be used with care .
pub fn new_with(
        hash: CryptoHashOf<BlockPayload>,
        payload_type: PayloadType,
        init: Box<dyn FnOnce() -> BlockPayload + Send>,
    ) -> Self {
        Self {
            payload_type,
            payload: Arc::new(Hashed {
                hash,
                value: Thunk::new(init),
            }),
        }
    }
pub fn new_with ( hash : CryptoHashOf < BlockPayload > , payload_type : PayloadType , init : Box < dyn FnOnce ( ) -> BlockPayload + Send > , ) -> Self { Self { payload_type , payload : Arc :: new ( Hashed { hash , value : Thunk :: new ( init ) , } ) , } }
Return a Payload with the given hash, and an intialization function that
will be use for lazily loading the actual `BlockPayload` matching
the given hash.
Return a Payload with the given hash and an intialization function that will be use for lazily loading the actual ` BlockPayload ` matching the given hash .
hash
CryptoHashOf<BlockPayload>
payload_type
PayloadType
init
Box<dyn FnOnce() -> BlockPayload + Send>