pub fn num_elements(&self) -> usize {
        let arr_size = match self {
            Type::Array(_, size, _) => size,
            Type::FieldElement(_)
            | Type::Integer(_, _, _)
            | Type::Bool
            | Type::Error
            | Type::Unspecified
            | Type::Unknown
            | Type::Unit => return 1,
        };

        match arr_size {
            ArraySize::Variable => unreachable!("ice : this method is only ever called when we want to compare the prover inputs with the ABI in main. The ABI should not have variable input. The program should be compiled before calling this"),
            ArraySize::Fixed(fixed_size) => *fixed_size as usize
        }
    }
/// Computes the number of elements in a Type
/// Arrays and Structs will be the only data structures to return more than one
Computes the number of elements in a Type
Arrays and Structs will be the only data structures to return more than one
Computes the number of elements in a Type Arrays and Structs will be the only data structures to return more than one
pub fn num_elements(&self) -> usize {
        let arr_size = match self {
            Type::Array(_, size, _) => size,
            Type::FieldElement(_)
            | Type::Integer(_, _, _)
            | Type::Bool
            | Type::Error
            | Type::Unspecified
            | Type::Unknown
            | Type::Unit => return 1,
        };
        match arr_size {
            ArraySize::Variable => unreachable!("ice : this method is only ever called when we want to compare the prover inputs with the ABI in main. The ABI should not have variable input. The program should be compiled before calling this"),
            ArraySize::Fixed(fixed_size) => *fixed_size as usize
        }
    }
pub fn num_elements ( & self ) -> usize { let arr_size = match self { Type :: Array ( _ , size , _ ) => size , Type :: FieldElement ( _ ) | Type :: Integer ( _ , _ , _ ) | Type :: Bool | Type :: Error | Type :: Unspecified | Type :: Unknown | Type :: Unit => return 1 , } ; match arr_size { ArraySize :: Variable => unreachable ! ( " " ) , ArraySize :: Fixed ( fixed_size ) => * fixed_size as usize } }
Computes the number of elements in a Type
Arrays and Structs will be the only data structures to return more than one
Computes the number of elements in a Type Arrays and Structs will be the only data structures to return more than one
&self
&self