(
local_key: u64,
is_shared: bool,
p: presentation::Node,
)
| 44 | ]; |
| 45 | |
| 46 | fn translate_node( |
| 47 | local_key: u64, |
| 48 | is_shared: bool, |
| 49 | p: presentation::Node, |
| 50 | ) -> Result<interlayer::Node> { |
| 51 | let ty = p.entity.ty.split('|').next().unwrap().trim(); |
| 52 | let inputs = inputs(local_key, ty)?.into_iter().collect(); |
| 53 | let outputs = outputs(local_key, ty)?.into_iter().collect(); |
| 54 | Ok(interlayer::Node { |
| 55 | entity: interlayer::Entity { |
| 56 | name: p.entity.name, |
| 57 | ty: p |
| 58 | .entity |
| 59 | .ty |
| 60 | .split('|') |
| 61 | .map(|x| x.trim().to_owned()) |
| 62 | .collect(), |
| 63 | args: p.entity.args, |
| 64 | }, |
| 65 | res: p.res, |
| 66 | cloned: p.cloned, |
| 67 | inputs, |
| 68 | outputs, |
| 69 | is_dyn: false, |
| 70 | is_shared, |
| 71 | }) |
| 72 | } |
| 73 | |
| 74 | fn translate_conn( |
| 75 | p: presentation::Connection, |
no test coverage detected