pub trait ForZkappCheck<F: FieldWitness>: Magnitude {
type CheckedType;
// Required methods
fn checked_from_field(field: F) -> Self::CheckedType;
fn lte(
this: &Self::CheckedType,
other: &Self::CheckedType,
w: &mut Witness<F>,
) -> Boolean;
// Provided method
fn to_checked(&self) -> Self::CheckedType { ... }
}
Expand description
Helper trait for zkapps in-snark checks (with trait InSnarkCheck
)
Required Associated Types§
type CheckedType
Required Methods§
fn checked_from_field(field: F) -> Self::CheckedType
fn lte( this: &Self::CheckedType, other: &Self::CheckedType, w: &mut Witness<F>, ) -> Boolean
Provided Methods§
fn to_checked(&self) -> Self::CheckedType
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.