pub trait Fancy {
type Item: Clone + Debug + HasModulus;
// Required method
fn constant(
&mut self,
x: u16,
q: u16,
channel: &mut Channel<'_>,
) -> Result<Self::Item>;
}Expand description
The Fancy trait is the core trait for writing circuits.
The trait contains an associated type, Fancy::Item, which defines the
underlying wire representation, alongside a Fancy::constant method for
creating constant (public) wires.
This trait can be further extended to support binary, arithmetic, and/or
projections by using the FancyBinary, FancyArithmetic, or
FancyProj extension traits, respectively. The FancyEncode trait
allows for encoding values into wires, and the FancyOutput trait allows
for converting wires into their underlying plaintext representation.