pub enum WireKind {
Constant,
InOut,
Derived,
Precommit,
Private,
}Variants§
Constant
InOut
Derived
A wire whose value is a pure function of public-derivable inputs (constants, inout, and
other derived wires). Derived wires live in the public segment and emit no constraint; the
verifier recomputes them itself via the InstanceGenerator.
Precommit
Private
Implementations§
Source§impl WireKind
impl WireKind
Sourcepub const fn segment(self) -> WitnessSegment
pub const fn segment(self) -> WitnessSegment
The witness segment a wire of this kind lives in: constants, inout, and derived wires occupy the public segment; precommit and private wires occupy their own segments.
Sourcepub fn is_public(self) -> bool
pub fn is_public(self) -> bool
Returns whether this wire kind lives in the public segment: its value is determined once the public inputs (constants and inout) are known, so the verifier can recompute it without any secret data.
Shared by all CircuitBuilder implementations so they make identical derived-vs-private
decisions. The output of a binary op (or hint) is WireKind::Derived iff every input is
public, and WireKind::Private otherwise.
Trait Implementations§
impl Copy for WireKind
impl Eq for WireKind
Source§impl Ord for WireKind
impl Ord for WireKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for WireKind
impl PartialOrd for WireKind
impl StructuralPartialEq for WireKind
Auto Trait Implementations§
impl Freeze for WireKind
impl RefUnwindSafe for WireKind
impl Send for WireKind
impl Sync for WireKind
impl Unpin for WireKind
impl UnsafeUnpin for WireKind
impl UnwindSafe for WireKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more