Trait fancy_garbling::circuit::CircuitType  
source · [−]pub trait CircuitType: Clone {
    type Gate: GateType;
Show 17 methods
    fn increment_nonfree_gates(&mut self);
    fn new(ngates: Option<usize>) -> Self;
    fn get_output_refs(&self) -> &[CircuitRef];
    fn get_garbler_input_refs(&self) -> &[CircuitRef];
    fn get_evaluator_input_refs(&self) -> &[CircuitRef];
    fn get_num_nonfree_gates(&self) -> usize;
    fn push_gates(&mut self, gate: Self::Gate);
    fn push_const_ref(&mut self, xref: CircuitRef);
    fn push_output_ref(&mut self, xref: CircuitRef);
    fn push_garbler_input_ref(&mut self, xref: CircuitRef);
    fn push_evaluator_input_ref(&mut self, xref: CircuitRef);
    fn push_modulus(&mut self, modulus: u16);
    fn garbler_input_mod(&self, i: usize) -> u16;
    fn evaluator_input_mod(&self, i: usize) -> u16;
    fn num_garbler_inputs(&self) -> usize { ... }
    fn num_evaluator_inputs(&self) -> usize { ... }
    fn noutputs(&self) -> usize { ... }
}Expand description
Trait representing circuits that can be built by CircuitBuilder
Required Associated Types
Required Methods
sourcefn increment_nonfree_gates(&mut self)
fn increment_nonfree_gates(&mut self)
Increase number of nonfree gates
sourcefn get_output_refs(&self) -> &[CircuitRef]
fn get_output_refs(&self) -> &[CircuitRef]
Get all output refs
sourcefn get_garbler_input_refs(&self) -> &[CircuitRef]
fn get_garbler_input_refs(&self) -> &[CircuitRef]
Get all garbler input refs
sourcefn get_evaluator_input_refs(&self) -> &[CircuitRef]
fn get_evaluator_input_refs(&self) -> &[CircuitRef]
Get all evaluator input refs
sourcefn get_num_nonfree_gates(&self) -> usize
fn get_num_nonfree_gates(&self) -> usize
Get number of nonfree gates
sourcefn push_gates(&mut self, gate: Self::Gate)
fn push_gates(&mut self, gate: Self::Gate)
Add a gate
sourcefn push_const_ref(&mut self, xref: CircuitRef)
fn push_const_ref(&mut self, xref: CircuitRef)
Add a constant ref
sourcefn push_output_ref(&mut self, xref: CircuitRef)
fn push_output_ref(&mut self, xref: CircuitRef)
Add an output ref
sourcefn push_garbler_input_ref(&mut self, xref: CircuitRef)
fn push_garbler_input_ref(&mut self, xref: CircuitRef)
Add a garbler input ref
sourcefn push_evaluator_input_ref(&mut self, xref: CircuitRef)
fn push_evaluator_input_ref(&mut self, xref: CircuitRef)
Add an evaluator input ref
sourcefn push_modulus(&mut self, modulus: u16)
fn push_modulus(&mut self, modulus: u16)
Add wire moulus
sourcefn garbler_input_mod(&self, i: usize) -> u16
fn garbler_input_mod(&self, i: usize) -> u16
Return the modulus of the garbler input indexed by i.
sourcefn evaluator_input_mod(&self, i: usize) -> u16
fn evaluator_input_mod(&self, i: usize) -> u16
Return the modulus of the evaluator input indexed by i.
Provided Methods
sourcefn num_garbler_inputs(&self) -> usize
fn num_garbler_inputs(&self) -> usize
Return the number of garbler inputs.
sourcefn num_evaluator_inputs(&self) -> usize
fn num_evaluator_inputs(&self) -> usize
Return the number of evaluator inputs.