pub trait Operation {
// Required methods
fn get_input_party_id(&self) -> Option<usize>;
fn inputs<'a>(&'a self) -> Box<dyn Iterator<Item = WireId> + 'a>;
fn outputs<'a>(&'a self) -> Box<dyn Iterator<Item = WireId> + 'a>;
// Provided method
fn is_input(&self) -> bool { ... }
}Expand description
A type that represents an MPC operation.
An implementation must satisfy the following invariant:
ⓘ
// Any "input" operation must yield exactly one output.
assert!(op.get_input_party_id().is_none() || op.outputs().count() == 1);Required Methods§
Sourcefn get_input_party_id(&self) -> Option<usize>
fn get_input_party_id(&self) -> Option<usize>
If the operation is an input, return the id of the party that gives the input. Otherwise,
return None.