pub fn lock(&self) -> Result<(), ModuleGraphError> {
    if let Some(locker) = &self.maybe_locker {
      let mut locker = locker.borrow_mut();
      for (_, module_slot) in self.modules.iter() {
        if let ModuleSlot::Module(module) = module_slot {
          if !locker.check_or_insert(&module.specifier, &module.source) {
            return Err(ModuleGraphError::InvalidSource(
              module.specifier.clone(),
            ));
          }
        }
      }
    }
    Ok(())
  }
/// Determine if the graph sources are valid by calling the passed locker. If
/// the integrity of all the sources passes or if there is no locker supplied
/// the method results in an ok, otherwise returns an error which indicates
/// the first specifier that failed the integrity check.
Determine if the graph sources are valid by calling the passed locker. If
the integrity of all the sources passes or if there is no locker supplied
the method results in an ok, otherwise returns an error which indicates
the first specifier that failed the integrity check.
Determine if the graph sources are valid by calling the passed locker . If the integrity of all the sources passes or if there is no locker supplied the method results in an ok otherwise returns an error which indicates the first specifier that failed the integrity check .
pub fn lock(&self) -> Result<(), ModuleGraphError> {
    if let Some(locker) = &self.maybe_locker {
      let mut locker = locker.borrow_mut();
      for (_, module_slot) in self.modules.iter() {
        if let ModuleSlot::Module(module) = module_slot {
          if !locker.check_or_insert(&module.specifier, &module.source) {
            return Err(ModuleGraphError::InvalidSource(
              module.specifier.clone(),
            ));
          }
        }
      }
    }
    Ok(())
  }
pub fn lock ( & self ) -> Result < ( ) , ModuleGraphError > { if let Some ( locker ) = & self . maybe_locker { let mut locker = locker . borrow_mut ( ) ; for ( _ , module_slot ) in self . modules . iter ( ) { if let ModuleSlot :: Module ( module ) = module_slot { if ! locker . check_or_insert ( & module . specifier , & module . source ) { return Err ( ModuleGraphError :: InvalidSource ( module . specifier . clone ( ) , ) ) ; } } } } Ok ( ( ) ) }
Determine if the graph sources are valid by calling the passed locker.
Determine if the graph sources are valid by calling the passed locker .
&self
&self