[pve-devel] [PATCH proxmox-ve-rs 2/2] firewall: alias: document difference between Alias and AliasName
Stefan Hanreich
s.hanreich at proxmox.com
Mon Nov 25 17:12:49 CET 2024
Alias and AliasName represent two different parts inside a firewall
configuration. Document the respective structs better to make the
differences between them clearer.
Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
proxmox-ve-config/src/firewall/types/alias.rs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/proxmox-ve-config/src/firewall/types/alias.rs b/proxmox-ve-config/src/firewall/types/alias.rs
index 08e4d77..a7c6c33 100644
--- a/proxmox-ve-config/src/firewall/types/alias.rs
+++ b/proxmox-ve-config/src/firewall/types/alias.rs
@@ -35,6 +35,7 @@ impl Display for AliasScope {
}
}
+/// Represents the name of an Alias in a firewall rule the firewall configuration.
#[derive(Debug, Clone, DeserializeFromStr, SerializeDisplay)]
#[cfg_attr(test, derive(Eq, PartialEq))]
pub struct AliasName {
@@ -86,6 +87,11 @@ impl AliasName {
}
}
+/// Represents an Alias stored in the ALIASES section of the firewall configuration.
+///
+/// Since they contain no scope in the firewall configuration itself, this struct also does not
+/// contain a scope. The scope has to be inferred from the Context where this Alias is stored, if
+/// that is necessary.
#[derive(Debug)]
#[cfg_attr(test, derive(Eq, PartialEq))]
pub struct Alias {
--
2.39.5
More information about the pve-devel
mailing list