pub fn workspace_path_and_default_target(&self, settings: &RazeSettings) -> Result<String> {
    match settings.genmode {
      GenMode::Remote => Ok(format!(
        "@{}__{}__{}//:{}",
        &settings.gen_workspace_prefix,
        &self.sanitized_name,
        &self.sanitized_version,
        &self.sanitized_name
      )),
      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, &self.sanitized_name
          ))
        } else {
          Ok(format!(
            "{}/vendor/{}:{}",
            settings.workspace_path, &self.package_ident, &self.sanitized_name
          ))
        }
      }
      GenMode::Unspecified => Err(anyhow!(
        "Unable to determine workspace path for GenMode::Unspecified"
      )),
    }
  }
/// Emits a complete path to this dependency and default target using the given settings.
Emits a complete path to this dependency and default target using the given settings.
Emits a complete path to this dependency and default target using the given settings .
pub fn workspace_path_and_default_target(&self, settings: &RazeSettings) -> Result<String> {
    match settings.genmode {
      GenMode::Remote => Ok(format!(
        "@{}__{}__{}//:{}",
        &settings.gen_workspace_prefix,
        &self.sanitized_name,
        &self.sanitized_version,
        &self.sanitized_name
      )),
      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, &self.sanitized_name
          ))
        } else {
          Ok(format!(
            "{}/vendor/{}:{}",
            settings.workspace_path, &self.package_ident, &self.sanitized_name
          ))
        }
      }
      GenMode::Unspecified => Err(anyhow!(
        "Unable to determine workspace path for GenMode::Unspecified"
      )),
    }
  }
pub fn workspace_path_and_default_target ( & self , settings : & RazeSettings ) -> Result < String > { match settings . genmode { GenMode :: Remote => Ok ( format ! ( " " settings gen_workspace_prefix self sanitized_name self sanitized_version self sanitized_name ) ) , 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 self sanitized_name ) ) } else { Ok ( format ! ( " " settings workspace_path self package_ident self sanitized_name ) ) } } GenMode :: Unspecified => Err ( anyhow ! ( " " ) ) , } }
Emits a complete path to this dependency and default target using the given settings.
Emits a complete path to this dependency and default target using the given settings .
&self
settings
&RazeSettings
&self
settings
&RazeSettings