MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / into_node

Method into_node

ciphercore-base/src/mpc/mpc_psi.rs:553–572  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
575struct DataShares {

Callers 1

instantiateMethod · 0.80

Calls 6

is_emptyMethod · 0.80
cloneMethod · 0.80
get_graphMethod · 0.45
create_named_tupleMethod · 0.45
pushMethod · 0.45
create_tupleMethod · 0.45

Tested by

no test coverage detected