pub fn insert_group(
        &mut self,
        name: &ast::Id,
        attrs: Attributes,
    ) -> Result<NodeIndex> {
        let key = Some(name.clone());
        if self.groups.contains_key(&key) {
            return Err(errors::Error::DuplicateGroup(name.clone()));
        }
        // create a new group
        self.groups.insert(key, (attrs, Vec::new()));

        // Create fake node for this group and add go/done holes
        let idx = self.graph.add_node(Node::new_hole(name.clone()));
        Ok(idx)
    }
/// Add a new named group into the structure.
Add a new named group into the structure.
Add a new named group into the structure .
pub fn insert_group(
        &mut self,
        name: &ast::Id,
        attrs: Attributes,
    ) -> Result<NodeIndex> {
        let key = Some(name.clone());
        if self.groups.contains_key(&key) {
            return Err(errors::Error::DuplicateGroup(name.clone()));
        }
        // create a new group
        self.groups.insert(key, (attrs, Vec::new()));
        // Create fake node for this group and add go/done holes
        let idx = self.graph.add_node(Node::new_hole(name.clone()));
        Ok(idx)
    }
pub fn insert_group ( & mut self , name : & ast :: Id , attrs : Attributes , ) -> Result < NodeIndex > { let key = Some ( name . clone ( ) ) ; if self . groups . contains_key ( & key ) { return Err ( errors :: Error :: DuplicateGroup ( name . clone ( ) ) ) ; } // create a new group self . groups . insert ( key , ( attrs , Vec :: new ( ) ) ) ; // Create fake node for this group and add go/done holes let idx = self . graph . add_node ( Node :: new_hole ( name . clone ( ) ) ) ; Ok ( idx ) }
Add a new named group into the structure.
Add a new named group into the structure .
&mut self
name
&ast::Id
attrs
Attributes