Function read_with_name

Source
pub fn read_with_name<D: Storage<DataPoint>, H: Storage<Bytes32>, A: AccessControlRegistry, W: Whitelist<Address = A::Address>>(
    name: Bytes32,
    msg_sender: &A::Address,
    datapoint_storage: &D,
    name_storage: &H,
    access: &A,
    whitelist: &W,
) -> Result<(Int, u32), Error>
Expand description

Reads the data point with name The read data point may belong to a Beacon or dAPI. The reader must be whitelisted for the hash of the data point name. Returns tuple containing (DataPoint.value, DataPoint.timestamp).

ยงArguments

  • name Data point name
  • msg_sender Address of who sent the transaction
  • datapoint_storage Data point storage that links datapoint_id to Datapoint
  • name_storage Name to Datapoint Id storage used
  • access The access control registry used
  • whitelist The whitelist implementation used