pub struct PveNetConfig {Show 15 fields
pub bridge: Option<String>,
pub firewall: Option<PveBoolean>,
pub gw: Option<String>,
pub gw6: Option<String>,
pub host_managed: Option<PveBoolean>,
pub hwaddr: Option<String>,
pub ip: Option<String>,
pub ip6: Option<String>,
pub link_down: Option<PveBoolean>,
pub mtu: Option<i32>,
pub name: String,
pub rate: Option<f64>,
pub tag: Option<i32>,
pub trunks: Option<String>,
pub type: Option<PveLxcTypeEnum>,
}Fields§
§bridge: Option<String>Bridge to attach the network device to.
firewall: Option<PveBoolean>Controls whether this interface’s firewall rules should be used.
gw: Option<String>Default gateway for IPv4 traffic.
gw6: Option<String>Default gateway for IPv6 traffic.
host_managed: Option<PveBoolean>Whether this interface’s IP configuration should be managed by the host. When enabled, the host (rather than the container) is responsible for the interface’s IP configuration. The container should not run its own DHCP client or network manager on this interface. This is useful for containers that lack an internal network management stack, like many application containers.
hwaddr: Option<String>A common MAC address with the I/G (Individual/Group) bit not set.
ip: Option<String>IPv4 address in CIDR format.
ip6: Option<String>IPv6 address in CIDR format.
link_down: Option<PveBoolean>Whether this interface should be disconnected (like pulling the plug).
mtu: Option<i32>Maximum transfer unit of the interface. (lxc.network.mtu)
name: StringName of the network device as seen from inside the container. (lxc.network.name)
rate: Option<f64>Apply rate limiting to the interface
tag: Option<i32>VLAN tag for this interface.
trunks: Option<String>VLAN ids to pass through the interface
type: Option<PveLxcTypeEnum>Network interface type.
Implementations§
Source§impl PveNetConfig
impl PveNetConfig
pub fn new(name: String) -> PveNetConfig
Source§impl PveNetConfig
impl PveNetConfig
Sourcepub fn to_shorthand(&self) -> String
pub fn to_shorthand(&self) -> String
Serialise this PveNetConfig into Proxmox’s CLI-style shorthand
string (key=value,…). The property marked x-pve-default-key
is emitted positionally without a key= prefix; aliases collapse
multiple property names to the same wire key.
Example: PveNetConfig
→ "virtio,bridge=vmbr0"
Trait Implementations§
Source§impl Clone for PveNetConfig
impl Clone for PveNetConfig
Source§fn clone(&self) -> PveNetConfig
fn clone(&self) -> PveNetConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PveNetConfig
impl Debug for PveNetConfig
Source§impl Default for PveNetConfig
impl Default for PveNetConfig
Source§fn default() -> PveNetConfig
fn default() -> PveNetConfig
Source§impl<'de> Deserialize<'de> for PveNetConfig
impl<'de> Deserialize<'de> for PveNetConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PveNetConfig
impl PartialEq for PveNetConfig
Source§fn eq(&self, other: &PveNetConfig) -> bool
fn eq(&self, other: &PveNetConfig) -> bool
self and other values to be equal, and is used by ==.