pub fn load<'a>(&self, config: &'a Config) -> Box<Source+'a> {
        trace!("loading SourceId; {}", self);
        match self.inner.kind {
            Kind::Git(..) => Box::new(GitSource::new(self, config)),
            Kind::Path => {
                let path = match self.inner.url.to_file_path() {
                    Ok(p) => p,
                    Err(()) => panic!("path sources cannot be remote"),
                };
                Box::new(PathSource::new(&path, self, config))
            }
            Kind::Registry => Box::new(RegistrySource::new(self, config)),
        }
    }
/// Creates an implementation of `Source` corresponding to this ID.
Creates an implementation of `Source` corresponding to this ID.
Creates an implementation of ` Source ` corresponding to this ID .
pub fn load<'a>(&self, config: &'a Config) -> Box<Source+'a> {
        trace!("loading SourceId; {}", self);
        match self.inner.kind {
            Kind::Git(..) => Box::new(GitSource::new(self, config)),
            Kind::Path => {
                let path = match self.inner.url.to_file_path() {
                    Ok(p) => p,
                    Err(()) => panic!("path sources cannot be remote"),
                };
                Box::new(PathSource::new(&path, self, config))
            }
            Kind::Registry => Box::new(RegistrySource::new(self, config)),
        }
    }
pub fn load < ' a > ( & self , config : & ' a Config ) -> Box < Source + ' a > { trace ! ( " " self ) ; match self . inner . kind { Kind :: Git ( .. ) => Box :: new ( GitSource :: new ( self , config ) ) , Kind :: Path => { let path = match self . inner . url . to_file_path ( ) { Ok ( p ) => p , Err ( ( ) ) => panic ! ( " " ) , } ; Box :: new ( PathSource :: new ( & path , self , config ) ) } Kind :: Registry => Box :: new ( RegistrySource :: new ( self , config ) ) , } }
Creates an implementation of `Source` corresponding to this ID.
Creates an implementation of ` Source ` corresponding to this ID .
&self
config
&'a Config
&self
config
&'a Config