pub fn lookup_and_load(&mut self, mfarity: &MFArity) -> Hopefully<CodePtr> {
    // Try lookup once, then load if not found
    match self.lookup(mfarity) {
      Ok(ip) => return Ok(ip),
      Err(_e) => {
        let mod_name = atom::to_str(mfarity.m)?;
        let found_mod = self.find_module_file(&mod_name).unwrap();

        self.try_load_module(&found_mod)?;
      }
    };
    // Try lookup again
    match self.lookup(mfarity) {
      Ok(ip) => Ok(ip),
      Err(_e) => {
        let mod_str = atom::to_str(mfarity.m)?;
        let fun_str = atom::to_str(mfarity.f)?;
        let msg = format!("{}Func undef: {}:{}/{}",
                          module(), mod_str, fun_str, mfarity.arity);
        Err(Error::FunctionNotFound(msg))
      }
    }
  }
/// Lookup, which will attempt to load a missing module if lookup fails
/// on the first attempt.
Lookup, which will attempt to load a missing module if lookup fails
on the first attempt.
Lookup which will attempt to load a missing module if lookup fails on the first attempt .
pub fn lookup_and_load(&mut self, mfarity: &MFArity) -> Hopefully<CodePtr> {
    // Try lookup once, then load if not found
    match self.lookup(mfarity) {
      Ok(ip) => return Ok(ip),
      Err(_e) => {
        let mod_name = atom::to_str(mfarity.m)?;
        let found_mod = self.find_module_file(&mod_name).unwrap();
        self.try_load_module(&found_mod)?;
      }
    };
    // Try lookup again
    match self.lookup(mfarity) {
      Ok(ip) => Ok(ip),
      Err(_e) => {
        let mod_str = atom::to_str(mfarity.m)?;
        let fun_str = atom::to_str(mfarity.f)?;
        let msg = format!("{}Func undef: {}:{}/{}",
                          module(), mod_str, fun_str, mfarity.arity);
        Err(Error::FunctionNotFound(msg))
      }
    }
  }
pub fn lookup_and_load ( & mut self , mfarity : & MFArity ) -> Hopefully < CodePtr > { // Try lookup once, then load if not found match self . lookup ( mfarity ) { Ok ( ip ) => return Ok ( ip ) , Err ( _e ) => { let mod_name = atom :: to_str ( mfarity . m ) ? ; let found_mod = self . find_module_file ( & mod_name ) . unwrap ( ) ; self . try_load_module ( & found_mod ) ? ; } } ; // Try lookup again match self . lookup ( mfarity ) { Ok ( ip ) => Ok ( ip ) , Err ( _e ) => { let mod_str = atom :: to_str ( mfarity . m ) ? ; let fun_str = atom :: to_str ( mfarity . f ) ? ; let msg = format ! ( " " module ( ) mod_str fun_str mfarity arity ) ; Err ( Error :: FunctionNotFound ( msg ) ) } } }
Lookup, which will attempt to load a missing module if lookup fails
on the first attempt.
Lookup which will attempt to load a missing module if lookup fails on the first attempt .
&mut self
mfarity
&MFArity