pub fn try_get(
    &self,
    specifier: &ModuleSpecifier,
  ) -> Result<Option<&Module>, ModuleGraphError> {
    let specifier = self.resolve(specifier);
    match self.modules.get(&specifier) {
      Some(ModuleSlot::Module(module)) => Ok(Some(module)),
      Some(ModuleSlot::Err(err)) => Err(err.clone()),
      _ => Ok(None),
    }
  }
/// Retrieve a module from the module graph. If the module identified as a
/// dependency of the graph, but resolving or loading that module resulted in
/// an error, the error will be returned as the `Err` of the result. If the
/// module is not part of the graph, or the module is missing from the graph,
/// the result will be `Ok` with the option of the module.
Retrieve a module from the module graph. If the module identified as a
dependency of the graph, but resolving or loading that module resulted in
an error, the error will be returned as the `Err` of the result. If the
module is not part of the graph, or the module is missing from the graph,
the result will be `Ok` with the option of the module.
Retrieve a module from the module graph . If the module identified as a dependency of the graph but resolving or loading that module resulted in an error the error will be returned as the ` Err ` of the result . If the module is not part of the graph or the module is missing from the graph the result will be ` Ok ` with the option of the module .
pub fn try_get(
    &self,
    specifier: &ModuleSpecifier,
  ) -> Result<Option<&Module>, ModuleGraphError> {
    let specifier = self.resolve(specifier);
    match self.modules.get(&specifier) {
      Some(ModuleSlot::Module(module)) => Ok(Some(module)),
      Some(ModuleSlot::Err(err)) => Err(err.clone()),
      _ => Ok(None),
    }
  }
pub fn try_get ( & self , specifier : & ModuleSpecifier , ) -> Result < Option < & Module > , ModuleGraphError > { let specifier = self . resolve ( specifier ) ; match self . modules . get ( & specifier ) { Some ( ModuleSlot :: Module ( module ) ) => Ok ( Some ( module ) ) , Some ( ModuleSlot :: Err ( err ) ) => Err ( err . clone ( ) ) , _ => Ok ( None ) , } }
Retrieve a module from the module graph.
Retrieve a module from the module graph .
&self
specifier
&ModuleSpecifier
&self
specifier
&ModuleSpecifier