pub fn workspace_path(&self, settings: &RazeSettings) -> Result<String> {
    match settings.genmode {
      GenMode::Remote => Ok(format!(
        "@{}__{}__{}//",
        &settings.gen_workspace_prefix, &self.sanitized_name, &self.sanitized_version
      )),
      GenMode::Vendored => {
        // Convert "settings.workspace_path" to dir. Workspace roots are special cased, no need to append /
        if settings.workspace_path.ends_with("//") {
          Ok(format!(
            "{}vendor/{}",
            settings.workspace_path, &self.package_ident
          ))
        } else {
          Ok(format!(
            "{}/vendor/{}",
            settings.workspace_path, &self.package_ident
          ))
        }
      }
      GenMode::Unspecified => Err(anyhow!(
        "Unable to determine workspace path for GenMode::Unspecified"
      )),
    }
  }
/// Yields the precise path to this dependency for the provided settings.
Yields the precise path to this dependency for the provided settings.
Yields the precise path to this dependency for the provided settings .
pub fn workspace_path(&self, settings: &RazeSettings) -> Result<String> {
    match settings.genmode {
      GenMode::Remote => Ok(format!(
        "@{}__{}__{}//",
        &settings.gen_workspace_prefix, &self.sanitized_name, &self.sanitized_version
      )),
      GenMode::Vendored => {
        // Convert "settings.workspace_path" to dir. Workspace roots are special cased, no need to append /
        if settings.workspace_path.ends_with("//") {
          Ok(format!(
            "{}vendor/{}",
            settings.workspace_path, &self.package_ident
          ))
        } else {
          Ok(format!(
            "{}/vendor/{}",
            settings.workspace_path, &self.package_ident
          ))
        }
      }
      GenMode::Unspecified => Err(anyhow!(
        "Unable to determine workspace path for GenMode::Unspecified"
      )),
    }
  }
pub fn workspace_path ( & self , settings : & RazeSettings ) -> Result < String > { match settings . genmode { GenMode :: Remote => Ok ( format ! ( " " settings gen_workspace_prefix self sanitized_name self sanitized_version ) ) , GenMode :: Vendored => { // Convert "settings.workspace_path" to dir. Workspace roots are special cased, no need to append / if settings . workspace_path . ends_with ( " " ) { Ok ( format ! ( " " settings workspace_path self package_ident ) ) } else { Ok ( format ! ( " " settings workspace_path self package_ident ) ) } } GenMode :: Unspecified => Err ( anyhow ! ( " " ) ) , } }
Yields the precise path to this dependency for the provided settings.
Yields the precise path to this dependency for the provided settings .
&self
settings
&RazeSettings
&self
settings
&RazeSettings