pub trait CircuitWitness: CircuitPublicWitness {
type PublicWitness: CircuitPublicWitness;
// Required method
fn into_public_witness(self) -> Self::PublicWitness;
}Expand description
Defines a circuit with witness data structure.
This trait should not be implemented manually. Instead, use the
#[derive(Circuit)] macro to automatically generate the implementation.
It provides methods for creating circuit variables and handling witness data.
Required Associated Types§
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.