pub trait Fancy {
type Item: Clone + HasModulus;
// Required methods
fn constant(
&mut self,
x: u16,
q: u16,
channel: &mut Channel<'_>,
) -> Result<Self::Item>;
fn output(
&mut self,
x: &Self::Item,
channel: &mut Channel<'_>,
) -> Result<Option<u16>>;
// Provided method
fn outputs(
&mut self,
xs: &[Self::Item],
channel: &mut Channel<'_>,
) -> Result<Option<Vec<u16>>> { ... }
}Expand description
DSL for the basic computations supported by fancy-garbling.
Primarily used as a supertrait for FancyBinary and FancyArithmetic,
which indicate computation supported by the DSL.
Required Associated Types§
Sourcetype Item: Clone + HasModulus
type Item: Clone + HasModulus
The underlying wire datatype created by an object implementing Fancy.