pub fn constraint_names(&self) -> Option<Vec<String>> {
        #[cfg(feature = "std")]
        {
            self.inner().and_then(|cs| {
                cs.borrow()
                    .constraint_traces
                    .iter()
                    .map(|trace| {
                        let mut constraint_path = String::new();
                        let mut prev_module_path = "";
                        let mut prefixes = ark_std::collections::BTreeSet::new();
                        for step in trace.as_ref()?.path() {
                            let module_path = if prev_module_path == step.module_path {
                                prefixes.insert(step.module_path.to_string());
                                String::new()
                            } else {
                                let mut parts = step
                                    .module_path
                                    .split("::")
                                    .filter(|&part| part != "r1cs_std" && part != "constraints");
                                let mut path_so_far = String::new();
                                for part in parts.by_ref() {
                                    if path_so_far.is_empty() {
                                        path_so_far += part;
                                    } else {
                                        path_so_far += &["::", part].join("");
                                    }
                                    if prefixes.contains(&path_so_far) {
                                        continue;
                                    } else {
                                        prefixes.insert(path_so_far.clone());
                                        break;
                                    }
                                }
                                parts.collect::<Vec<_>>().join("::") + "::"
                            };
                            prev_module_path = step.module_path;
                            constraint_path += &["/", &module_path, step.name].join("");
                        }
                        Some(constraint_path)
                    })
                    .collect::<Option<Vec<_>>>()
            })
        }
        #[cfg(not(feature = "std"))]
        {
            None
        }
    }
/// Get trace information about all constraints in the system
Get trace information about all constraints in the system
Get trace information about all constraints in the system
pub fn constraint_names(&self) -> Option<Vec<String>> {
        #[cfg(feature = "std")]
        {
            self.inner().and_then(|cs| {
                cs.borrow()
                    .constraint_traces
                    .iter()
                    .map(|trace| {
                        let mut constraint_path = String::new();
                        let mut prev_module_path = "";
                        let mut prefixes = ark_std::collections::BTreeSet::new();
                        for step in trace.as_ref()?.path() {
                            let module_path = if prev_module_path == step.module_path {
                                prefixes.insert(step.module_path.to_string());
                                String::new()
                            } else {
                                let mut parts = step
                                    .module_path
                                    .split("::")
                                    .filter(|&part| part != "r1cs_std" && part != "constraints");
                                let mut path_so_far = String::new();
                                for part in parts.by_ref() {
                                    if path_so_far.is_empty() {
                                        path_so_far += part;
                                    } else {
                                        path_so_far += &["::", part].join("");
                                    }
                                    if prefixes.contains(&path_so_far) {
                                        continue;
                                    } else {
                                        prefixes.insert(path_so_far.clone());
                                        break;
                                    }
                                }
                                parts.collect::<Vec<_>>().join("::") + "::"
                            };
                            prev_module_path = step.module_path;
                            constraint_path += &["/", &module_path, step.name].join("");
                        }
                        Some(constraint_path)
                    })
                    .collect::<Option<Vec<_>>>()
            })
        }
        #[cfg(not(feature = "std"))]
        {
            None
        }
    }
pub fn constraint_names ( & self ) -> Option < Vec < String > > { # [ cfg ( feature " " ) ] { self . inner ( ) . and_then ( | cs | { cs . borrow ( ) . constraint_traces . iter ( ) . map ( | trace | { let mut constraint_path = String :: new ( ) ; let mut prev_module_path = " " ; let mut prefixes = ark_std :: collections :: BTreeSet :: new ( ) ; for step in trace . as_ref ( ) ? . path ( ) { let module_path = if prev_module_path == step . module_path { prefixes . insert ( step . module_path . to_string ( ) ) ; String :: new ( ) } else { let mut parts = step . module_path . split ( " " ) . filter ( | & part | part != " " && part != " " ) ; let mut path_so_far = String :: new ( ) ; for part in parts . by_ref ( ) { if path_so_far . is_empty ( ) { path_so_far += part ; } else { path_so_far += & [ " " , part ] . join ( " " ) ; } if prefixes . contains ( & path_so_far ) { continue ; } else { prefixes . insert ( path_so_far . clone ( ) ) ; break ; } } parts . collect :: < Vec < _ > > ( ) . join ( " " ) + " " } ; prev_module_path = step . module_path ; constraint_path += & [ " " , & module_path , step . name ] . join ( " " ) ; } Some ( constraint_path ) } ) . collect :: < Option < Vec < _ > > > ( ) } ) } # [ cfg ( not ( feature " " ) ) ] { None } }
Get trace information about all constraints in the system
Get trace information about all constraints in the system
&self
&self