pub fn add_element(&mut self, element: Element) -> Result<ElementIndex, ModelError> {
        let elements = self.module.elements.get_or_insert_with(Vec::new);
        let index = u32::try_from(elements.len())?;

        elements.push(element);

        Ok(index)
    }
/// Adds the element to the module's segment.
/// Returns the index of the element in the module.
Adds the element to the module's segment.
Returns the index of the element in the module.
Adds the element to the module ' s segment . Returns the index of the element in the module .
pub fn add_element(&mut self, element: Element) -> Result<ElementIndex, ModelError> {
        let elements = self.module.elements.get_or_insert_with(Vec::new);
        let index = u32::try_from(elements.len())?;
        elements.push(element);
        Ok(index)
    }
pub fn add_element ( & mut self , element : Element ) -> Result < ElementIndex , ModelError > { let elements = self . module . elements . get_or_insert_with ( Vec :: new ) ; let index = u32 :: try_from ( elements . len ( ) ) ? ; elements . push ( element ) ; Ok ( index ) }
Adds the element to the module's segment.
Adds the element to the module ' s segment .
&mut self
element
Element
&mut self
element
Element