Skip to main content

BoolInterface

Trait BoolInterface 

Source
pub trait BoolInterface
where Self: Sized,
{ type W: WitnessGenerator<Fp>; type FailureStatusTable; // Required methods fn as_boolean(&self) -> Boolean; fn of_boolean(b: Boolean) -> Self; fn true_() -> Self; fn false_() -> Self; fn neg(&self) -> Self; fn or(a: Self, b: Self, w: &mut Self::W) -> Self; fn and(a: Self, b: Self, w: &mut Self::W) -> Self; fn equal(a: Self, b: Self, w: &mut Self::W) -> Self; fn all(bs: &[Self], w: &mut Self::W) -> Self; fn assert_any(bs: &[Self], w: &mut Self::W) -> Result<(), String>; fn assert_with_failure_status_tbl( b: Self, table: &Self::FailureStatusTable, ) -> Result<(), String>; }

Required Associated Types§

Required Methods§

Source

fn as_boolean(&self) -> Boolean

Source

fn of_boolean(b: Boolean) -> Self

Source

fn true_() -> Self

Source

fn false_() -> Self

Source

fn neg(&self) -> Self

Source

fn or(a: Self, b: Self, w: &mut Self::W) -> Self

Source

fn and(a: Self, b: Self, w: &mut Self::W) -> Self

Source

fn equal(a: Self, b: Self, w: &mut Self::W) -> Self

Source

fn all(bs: &[Self], w: &mut Self::W) -> Self

Source

fn assert_any(bs: &[Self], w: &mut Self::W) -> Result<(), String>

Source

fn assert_with_failure_status_tbl( b: Self, table: &Self::FailureStatusTable, ) -> Result<(), String>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl BoolInterface for bool

Source§

type W = ()

Source§

type FailureStatusTable = Vec<Vec<TransactionFailure>>

Source§

fn as_boolean(&self) -> Boolean

Source§

fn of_boolean(b: Boolean) -> Self

Source§

fn true_() -> Self

Source§

fn false_() -> Self

Source§

fn neg(&self) -> Self

Source§

fn or(a: Self, b: Self, w: &mut Self::W) -> Self

Source§

fn and(a: Self, b: Self, w: &mut Self::W) -> Self

Source§

fn equal(a: Self, b: Self, w: &mut Self::W) -> Self

Source§

fn all(bs: &[Self], w: &mut Self::W) -> Self

Source§

fn assert_any(bs: &[Self], w: &mut Self::W) -> Result<(), String>

Source§

fn assert_with_failure_status_tbl( b: Self, failure_status_tbl: &Self::FailureStatusTable, ) -> Result<(), String>

Implementors§

Source§

impl BoolInterface for SnarkBool

Source§

type W = Witness<Fp<MontBackend<FqConfig, 4>, 4>>

Source§

type FailureStatusTable = ()