pub trait CircuitWitness: CircuitPublicWitness {
type CircuitElement: CircuitElement<CircuitWitness = Self>;
type PublicWitness: CircuitPublicWitness;
// Required method
fn into_public_witness(self) -> Self::PublicWitness;
}Expand description
Defines a circuit with witness data structure.
This trait represents the witness data that corresponds to a CircuitElement.
While CircuitElement defines the structure used in circuit logic,
CircuitWitness contains the actual values used during proof generation.
This trait should not be implemented manually. Instead, use the
#[circuit] macro to automatically generate the implementation.
Required Associated Types§
type CircuitElement: CircuitElement<CircuitWitness = Self>
Sourcetype PublicWitness: CircuitPublicWitness
type PublicWitness: CircuitPublicWitness
The type representing the public witness for this circuit.
Required Methods§
Sourcefn into_public_witness(self) -> Self::PublicWitness
fn into_public_witness(self) -> Self::PublicWitness
Converts this circuit witness into its public witness representation.
This extracts only the public portion of the witness, which is needed for verification in zero-knowledge proof systems.
§Returns
The public witness containing only public inputs
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.