(self)
| 551 | } |
| 552 | |
| 553 | fn into_node(self) -> Result<Node> { |
| 554 | if self.is_empty() { |
| 555 | return Err(runtime_error!("Can't turn empty shares into a node")); |
| 556 | } |
| 557 | match self { |
| 558 | Columns::Public(columns) => { |
| 559 | let g = columns[0].1.get_graph(); |
| 560 | g.create_named_tuple(columns) |
| 561 | } |
| 562 | Columns::Shared(shares) => { |
| 563 | let g = shares[0][0].1.get_graph(); |
| 564 | let mut result_shares = vec![]; |
| 565 | for share_vec in shares { |
| 566 | let share = g.create_named_tuple(share_vec.clone())?; |
| 567 | result_shares.push(share); |
| 568 | } |
| 569 | g.create_tuple(result_shares) |
| 570 | } |
| 571 | } |
| 572 | } |
| 573 | } |
| 574 | |
| 575 | struct DataShares { |
no test coverage detected