pub fn add_function_type(
        &mut self,
        function_type: FunctionType,
    ) -> Result<TypeIndex, ModelError> {
        let function_types = self.module.function_types.get_or_insert_with(Vec::new);
        let index = u32::try_from(function_types.len())?;

        function_types.push(function_type);

        Ok(index)
    }
/// Adds the function type to the module's segment.
/// Returns the index of the type in the module.
Adds the function type to the module's segment.
Returns the index of the type in the module.
Adds the function type to the module ' s segment . Returns the index of the type in the module .
pub fn add_function_type(
        &mut self,
        function_type: FunctionType,
    ) -> Result<TypeIndex, ModelError> {
        let function_types = self.module.function_types.get_or_insert_with(Vec::new);
        let index = u32::try_from(function_types.len())?;
        function_types.push(function_type);
        Ok(index)
    }
pub fn add_function_type ( & mut self , function_type : FunctionType , ) -> Result < TypeIndex , ModelError > { let function_types = self . module . function_types . get_or_insert_with ( Vec :: new ) ; let index = u32 :: try_from ( function_types . len ( ) ) ? ; function_types . push ( function_type ) ; Ok ( index ) }
Adds the function type to the module's segment.
Adds the function type to the module ' s segment .
&mut self
function_type
FunctionType
&mut self
function_type
FunctionType