deploy_items

Function deploy_items 

Source
pub async fn deploy_items<T: Serialize>(items: &T) -> EResult<()>
Expand description

Deploys items

Must be called after the node core is ready

The parameter must contain a list of item deployment payloads is equal to item.deploy eva.core EAPI call See also https://info.bma.ai/en/actual/eva4/iac.html#items

The parameter MUST be a collection: either inside the payload, or a list of payloads in a vector/slice etc.

Example:

let me = initial.id().to_owned();
tokio::spawn(async move {
  let _ = eapi_bus::wait_core(true).await;
    let x: OID = "lmacro:aaa".parse().unwrap();
    let payload = serde_json::json! {[
       {
         "oid": x,
          "action": {"svc": me }
       }
       ]};
       let result = eapi_bus::deploy_items(&payload).await;
});

§Panics

Will panic if RPC not set