cargo_dist/config/v1/installers/
shell.rs1use super::*;
4
5#[derive(Debug, Default, Clone, Serialize, Deserialize)]
7#[serde(rename_all = "kebab-case")]
8pub struct ShellInstallerLayer {
9 #[serde(flatten)]
11 pub common: CommonInstallerLayer,
12}
13#[derive(Debug, Default, Clone)]
15pub struct ShellInstallerConfig {
16 pub common: CommonInstallerConfig,
18}
19
20impl ShellInstallerConfig {
21 pub fn defaults_for_package(
23 _workspaces: &WorkspaceGraph,
24 _pkg_idx: PackageIdx,
25 common: &CommonInstallerConfig,
26 ) -> Self {
27 Self {
28 common: common.clone(),
29 }
30 }
31}
32
33impl ApplyLayer for ShellInstallerConfig {
34 type Layer = ShellInstallerLayer;
35 fn apply_layer(&mut self, Self::Layer { common }: Self::Layer) {
36 self.common.apply_layer(common);
37 }
38}
39impl ApplyLayer for ShellInstallerLayer {
40 type Layer = ShellInstallerLayer;
41 fn apply_layer(&mut self, Self::Layer { common }: Self::Layer) {
42 self.common.apply_layer(common);
43 }
44}
45
46impl std::ops::Deref for ShellInstallerConfig {
47 type Target = CommonInstallerConfig;
48 fn deref(&self) -> &Self::Target {
49 &self.common
50 }
51}