derive_properties

Function derive_properties 

Source
pub fn derive_properties(attrs_json: &str) -> NodeProperties
Expand description

Derive NodeProperties from a JSON-serialized attrs string.

Detection precedence (DP-1, DP-3):

  1. node_type = “root” / “host” / “proc” → corresponding variant
  2. error_code present → Error
  3. STATUS key present → Actor
  4. none of the above → Error(“unknown_node_type”)

DP-2 / DP-4: this function is total — malformed attrs never panic; view decode failures map to NodeProperties::Error with a malformed_* code. AV-3 / IA-6: view decoders ignore unknown keys.