pub struct Subnet { /* private fields */ }
Expand description
Structure representing a subnet - a virtual NIC.
Implementations
sourceimpl Subnet
impl Subnet
sourcepub fn allocation_pools(&self) -> &Vec<AllocationPool>
pub fn allocation_pools(&self) -> &Vec<AllocationPool>
Allocation pools for DHCP.
sourcepub fn allocation_pools_mut(&mut self) -> &mut Vec<AllocationPool>
pub fn allocation_pools_mut(&mut self) -> &mut Vec<AllocationPool>
Update the allocation pools for DHCP.
sourcepub fn set_allocation_pools(&mut self, value: Vec<AllocationPool>)
pub fn set_allocation_pools(&mut self, value: Vec<AllocationPool>)
Update the allocation pools for DHCP.
sourcepub fn with_allocation_pools(self, value: Vec<AllocationPool>) -> Self
pub fn with_allocation_pools(self, value: Vec<AllocationPool>) -> Self
Update the allocation pools for DHCP.
sourcepub fn created_at(&self) -> Option<DateTime<FixedOffset>>
pub fn created_at(&self) -> Option<DateTime<FixedOffset>>
Creation data and time (if available).
sourcepub fn description(&self) -> &Option<String>
pub fn description(&self) -> &Option<String>
Subnet description.
sourcepub fn set_description<S: Into<String>>(&mut self, value: S)
pub fn set_description<S: Into<String>>(&mut self, value: S)
Update the description.
sourcepub fn with_description<S: Into<String>>(self, value: S) -> Self
pub fn with_description<S: Into<String>>(self, value: S) -> Self
Update the description.
sourcepub fn dhcp_enabled(&self) -> bool
pub fn dhcp_enabled(&self) -> bool
Whether DHCP is enabled.
sourcepub fn set_dhcp_enabled(&mut self, value: bool)
pub fn set_dhcp_enabled(&mut self, value: bool)
Update whether DHCP is enabled.
sourcepub fn with_dhcp_enabled(self, value: bool) -> Self
pub fn with_dhcp_enabled(self, value: bool) -> Self
Update whether DHCP is enabled.
sourcepub fn dns_nameservers(&self) -> &Vec<String>
pub fn dns_nameservers(&self) -> &Vec<String>
List of DNS servers.
sourcepub fn dns_nameservers_mut(&mut self) -> &mut Vec<String>
pub fn dns_nameservers_mut(&mut self) -> &mut Vec<String>
Update the list of DNS servers.
sourcepub fn set_dns_nameservers(&mut self, value: Vec<String>)
pub fn set_dns_nameservers(&mut self, value: Vec<String>)
Update the list of DNS servers.
sourcepub fn with_dns_nameservers(self, value: Vec<String>) -> Self
pub fn with_dns_nameservers(self, value: Vec<String>) -> Self
Update the list of DNS servers.
sourcepub fn gateway_ip(&self) -> Option<IpAddr>
pub fn gateway_ip(&self) -> Option<IpAddr>
Gateway IP address (if any).
sourcepub fn set_gateway_ip(&mut self, value: IpAddr)
pub fn set_gateway_ip(&mut self, value: IpAddr)
Update the gateway IP.
sourcepub fn with_gateway_ip(self, value: IpAddr) -> Self
pub fn with_gateway_ip(self, value: IpAddr) -> Self
Update the gateway IP.
sourcepub fn host_routes(&self) -> &Vec<HostRoute>
pub fn host_routes(&self) -> &Vec<HostRoute>
Statically configured routes.
sourcepub fn host_routes_mut(&mut self) -> &mut Vec<HostRoute>
pub fn host_routes_mut(&mut self) -> &mut Vec<HostRoute>
Update the statically configured routes.
sourcepub fn set_host_routes(&mut self, value: Vec<HostRoute>)
pub fn set_host_routes(&mut self, value: Vec<HostRoute>)
Update the statically configured routes.
sourcepub fn with_host_routes(self, value: Vec<HostRoute>) -> Self
pub fn with_host_routes(self, value: Vec<HostRoute>) -> Self
Update the statically configured routes.
sourcepub fn ip_version(&self) -> IpVersion
pub fn ip_version(&self) -> IpVersion
IP protocol version.
sourcepub fn ipv6_address_mode(&self) -> Option<Ipv6Mode>
pub fn ipv6_address_mode(&self) -> Option<Ipv6Mode>
Address assignment mode for IPv6.
sourcepub fn ipv6_router_advertisement_mode(&self) -> Option<Ipv6Mode>
pub fn ipv6_router_advertisement_mode(&self) -> Option<Ipv6Mode>
Router advertisement mode for IPv6.
sourcepub fn network_id(&self) -> &String
pub fn network_id(&self) -> &String
ID of the network this subnet belongs to.
sourcepub fn updated_at(&self) -> Option<DateTime<FixedOffset>>
pub fn updated_at(&self) -> Option<DateTime<FixedOffset>>
Last update data and time (if available).
sourcepub fn delete(self) -> Result<DeletionWaiter<Subnet>>
pub fn delete(self) -> Result<DeletionWaiter<Subnet>>
Delete the subnet.