pub fn hash_for_cache<'data, H>(
        &self,
        function_body_inputs: &PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
        state: &mut H,
    ) where
        H: Hasher,
    {
        // There's no need to cache names (strings), start function
        // and data initializers (for both memory and tables)
        self.signatures.hash(state);
        self.functions.hash(state);
        self.table_plans.hash(state);
        self.memory_plans.hash(state);
        self.globals.hash(state);
        // IndexMap (self.export) iterates over values in order of item inserts
        // Let's actually sort the values.
        let mut exports = self.exports.values().collect::<Vec<_>>();
        exports.sort();
        for val in exports {
            val.hash(state);
        }
        function_body_inputs.hash(state);
    }
/// Computes hash of the module for the purpose of caching.
Computes hash of the module for the purpose of caching.
Computes hash of the module for the purpose of caching .
pub fn hash_for_cache<'data, H>(
        &self,
        function_body_inputs: &PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
        state: &mut H,
    ) where
        H: Hasher,
    {
        // There's no need to cache names (strings), start function
        // and data initializers (for both memory and tables)
        self.signatures.hash(state);
        self.functions.hash(state);
        self.table_plans.hash(state);
        self.memory_plans.hash(state);
        self.globals.hash(state);
        // IndexMap (self.export) iterates over values in order of item inserts
        // Let's actually sort the values.
        let mut exports = self.exports.values().collect::<Vec<_>>();
        exports.sort();
        for val in exports {
            val.hash(state);
        }
        function_body_inputs.hash(state);
    }
pub fn hash_for_cache < ' data , H > ( & self , function_body_inputs : & PrimaryMap < DefinedFuncIndex , FunctionBodyData < ' data > > , state : & mut H , ) where H : Hasher , { // There's no need to cache names (strings), start function // and data initializers (for both memory and tables) self . signatures . hash ( state ) ; self . functions . hash ( state ) ; self . table_plans . hash ( state ) ; self . memory_plans . hash ( state ) ; self . globals . hash ( state ) ; // IndexMap (self.export) iterates over values in order of item inserts // Let's actually sort the values. let mut exports = self . exports . values ( ) . collect :: < Vec < _ > > ( ) ; exports . sort ( ) ; for val in exports { val . hash ( state ) ; } function_body_inputs . hash ( state ) ; }
Computes hash of the module for the purpose of caching.
Computes hash of the module for the purpose of caching .
&self
function_body_inputs
&PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>
state
&mut H
&self
function_body_inputs
&PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>
state
&mut H