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

Method new

ciphercore-base/src/mpc/mpc_psi.rs:35–50  ·  view source on GitHub ↗
(headers_types: Vec<(String, ColumnType)>)

Source from the content-addressed store, hash-verified

33
34impl ColumnTypesInfo {
35 fn new(headers_types: Vec<(String, ColumnType)>) -> Self {
36 let mut mask_headers_map = HashMap::new();
37 let mut headers_map = HashMap::new();
38 for (i, (h, column_t)) in headers_types.iter().enumerate() {
39 if column_t.has_mask() {
40 // Mask names should be unique
41 mask_headers_map.insert(h.into(), format!("{h}-mask-cvbphkieac",));
42 }
43 headers_map.insert(h.into(), i);
44 }
45 ColumnTypesInfo {
46 headers_types,
47 headers_map,
48 mask_headers_map,
49 }
50 }
51 fn get_num_entries(&self) -> u64 {
52 self.headers_types[0].1.get_num_entries()
53 }

Callers

nothing calls this directly

Calls 2

has_maskMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected