/// Construct an absolute ModuleId from an absolute or relative load().
Construct an absolute ModuleId from an absolute or relative load().
Construct an absolute ModuleId from an absolute or relative load () .
pub fn canonicalize_load(&self, load: &str) -> Result<Self> {
        match load.strip_prefix(':') {
            Some(rel) => Ok(Self(self.0.parent().unwrap().join(rel))),
            None => match load.starts_with("//") {
                true => Self::from_id(load),
                false => Err(Error::EvalModule(anyhow!(
                    "load('{}') is neither absolute nor relative",
                    load
                ))),
            },
        }
    }
pub fn canonicalize_load ( & self , load : & str ) -> Result < Self > { match load . strip_prefix ( ':' ) { Some ( rel ) => Ok ( Self ( self . 0 . parent ( ) . unwrap ( ) . join ( rel ) ) ) , None => match load . starts_with ( " " ) { true => Self :: from_id ( load ) , false => Err ( Error :: EvalModule ( anyhow ! ( " " load ) ) ) , } , } }
Construct an absolute ModuleId from an absolute or relative load().
Construct an absolute ModuleId from an absolute or relative load () .
&self
load
&str