snarkvm_circuit_environment::macros

Macro assert_count

Source
macro_rules! assert_count {
    ($type_:ty, $operation:path, $case:expr) => { ... };
    (FromBoolean($input:ident) => $output:ident, $case:expr) => { ... };
    ($operation:tt<$boolean:ident>() => $output:ident, $case:expr) => { ... };
    ($operation:tt($input:ident) => $output:ident, $case:expr) => { ... };
    ($operation:tt($input_a:ident, $input_b:ident) => $output:ident, $case:expr) => { ... };
    ($operation:tt($boolean:ident, $input_a:ident, $input_b:ident) => $output:ident, $case:expr) => { ... };
    ($operation:tt<$boolean:ident>() => $output:ident<$($parameter:ident),+>, $case:expr) => { ... };
    ($operation:tt($input:ident<$($parameter_a:ident),+>) => $output:ident<$($parameter_b:ident),+>, $case:expr) => { ... };
    ($operation:tt($input_a:ident<$($parameter_a:ident),+>, $input_b:ident<$($parameter_b:ident),+>) => $output:ident, $case:expr) => { ... };
    ($operation:tt($input_a:ident<$($parameter_a:ident),+>, $input_b:ident<$($parameter_b:ident),+>) => $output:ident<$($parameter_c:ident),+>, $case:expr) => { ... };
    ($operation:tt($boolean:ident, $input_a:ident<$($parameter_a:ident),+>, $input_b:ident<$($parameter_b:ident),+>) => $output:ident<$($parameter_c:ident),+>, $case:expr) => { ... };
}
Expand description

Asserts the count for a given operation and case, and ensure the circuit is satisfied.

§Example

assert_count!(Add(Field, Field) => Field, &(mode_a, mode_b))