pub struct InterfaceOverridesPatch {
pub mac: Option<[u8; 6]>,
pub mtu: Option<u16>,
pub ipv4_address: Option<Ipv4Addr>,
pub ipv4_pool: Option<Ipv4Network>,
pub ipv6_address: Option<Ipv6Addr>,
pub ipv6_pool: Option<Ipv6Network>,
}Expand description
A sparse, presence-aware patch for InterfaceOverrides.
Fields§
§mac: Option<[u8; 6]>Pending update for mac. Omitted values leave the target unchanged.
mtu: Option<u16>Pending update for mtu. Omitted values leave the target unchanged.
ipv4_address: Option<Ipv4Addr>Pending update for ipv4_address. Omitted values leave the target unchanged.
ipv4_pool: Option<Ipv4Network>Pending update for ipv4_pool. Omitted values leave the target unchanged.
ipv6_address: Option<Ipv6Addr>Pending update for ipv6_address. Omitted values leave the target unchanged.
ipv6_pool: Option<Ipv6Network>Pending update for ipv6_pool. Omitted values leave the target unchanged.
Implementations§
Source§impl InterfaceOverridesPatch
impl InterfaceOverridesPatch
Sourcepub fn mac_mut(&mut self, value: [u8; 6]) -> &mut Self
pub fn mac_mut(&mut self, value: [u8; 6]) -> &mut Self
Set the mac field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn mtu_mut(&mut self, value: u16) -> &mut Self
pub fn mtu_mut(&mut self, value: u16) -> &mut Self
Set the mtu field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn ipv4_address(self, value: Ipv4Addr) -> Self
pub fn ipv4_address(self, value: Ipv4Addr) -> Self
Set the ipv4_address field in this patch.
Sourcepub fn ipv4_address_mut(&mut self, value: Ipv4Addr) -> &mut Self
pub fn ipv4_address_mut(&mut self, value: Ipv4Addr) -> &mut Self
Set the ipv4_address field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn ipv4_pool(self, value: Ipv4Network) -> Self
pub fn ipv4_pool(self, value: Ipv4Network) -> Self
Set the ipv4_pool field in this patch.
Sourcepub fn ipv4_pool_mut(&mut self, value: Ipv4Network) -> &mut Self
pub fn ipv4_pool_mut(&mut self, value: Ipv4Network) -> &mut Self
Set the ipv4_pool field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn ipv6_address(self, value: Ipv6Addr) -> Self
pub fn ipv6_address(self, value: Ipv6Addr) -> Self
Set the ipv6_address field in this patch.
Sourcepub fn ipv6_address_mut(&mut self, value: Ipv6Addr) -> &mut Self
pub fn ipv6_address_mut(&mut self, value: Ipv6Addr) -> &mut Self
Set the ipv6_address field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn ipv6_pool(self, value: Ipv6Network) -> Self
pub fn ipv6_pool(self, value: Ipv6Network) -> Self
Set the ipv6_pool field in this patch.
Sourcepub fn ipv6_pool_mut(&mut self, value: Ipv6Network) -> &mut Self
pub fn ipv6_pool_mut(&mut self, value: Ipv6Network) -> &mut Self
Set the ipv6_pool field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_mac(self) -> Self
pub fn clear_mac(self) -> Self
Remove mac from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_mac_mut(&mut self) -> &mut Self
pub fn clear_mac_mut(&mut self) -> &mut Self
Remove mac from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_mtu(self) -> Self
pub fn clear_mtu(self) -> Self
Remove mtu from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_mtu_mut(&mut self) -> &mut Self
pub fn clear_mtu_mut(&mut self) -> &mut Self
Remove mtu from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_ipv4_address(self) -> Self
pub fn clear_ipv4_address(self) -> Self
Remove ipv4_address from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_ipv4_address_mut(&mut self) -> &mut Self
pub fn clear_ipv4_address_mut(&mut self) -> &mut Self
Remove ipv4_address from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_ipv4_pool(self) -> Self
pub fn clear_ipv4_pool(self) -> Self
Remove ipv4_pool from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_ipv4_pool_mut(&mut self) -> &mut Self
pub fn clear_ipv4_pool_mut(&mut self) -> &mut Self
Remove ipv4_pool from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_ipv6_address(self) -> Self
pub fn clear_ipv6_address(self) -> Self
Remove ipv6_address from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_ipv6_address_mut(&mut self) -> &mut Self
pub fn clear_ipv6_address_mut(&mut self) -> &mut Self
Remove ipv6_address from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_ipv6_pool(self) -> Self
pub fn clear_ipv6_pool(self) -> Self
Remove ipv6_pool from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_ipv6_pool_mut(&mut self) -> &mut Self
pub fn clear_ipv6_pool_mut(&mut self) -> &mut Self
Remove ipv6_pool from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn overlay(self, higher: Self) -> Self
pub fn overlay(self, higher: Self) -> Self
Overlay a higher-precedence patch using each field’s declared strategy.
Sourcepub fn overlay_mut(&mut self, higher: Self) -> &mut Self
pub fn overlay_mut(&mut self, higher: Self) -> &mut Self
Overlay a higher-precedence patch using each field’s declared strategy. Mutates this patch in place and returns it for chaining.
Sourcepub fn apply_to(self, target: &mut InterfaceOverrides)
pub fn apply_to(self, target: &mut InterfaceOverrides)
Apply every present field to an existing value.
Sourcepub fn into_config(self) -> InterfaceOverrides
pub fn into_config(self) -> InterfaceOverrides
Apply this patch to the configuration’s defaults.
Compose all overlays first. This conversion does not validate the result.
Sourcepub fn from_present_fields(value: InterfaceOverrides) -> Self
pub fn from_present_fields(value: InterfaceOverrides) -> Self
Convert non-null fields into a changeset, treating Option::None as absent.