pub struct NewSubnet { /* private fields */ }
Expand description

A request to create a subnet.

Implementations§

source§

impl NewSubnet

source

pub async fn create(self) -> Result<Subnet>

Request creation of the subnet.

source

pub fn add_allocation_pool(&mut self, value: AllocationPool)

Allocation pool(s) for the subnet (the default is the whole CIDR).

source

pub fn allocation_pools(&mut self) -> &mut Vec<AllocationPool>

Allocation pool(s) for the subnet (the default is the whole CIDR).

source

pub fn with_allocation_pool(self, value: AllocationPool) -> Self

Allocation pool(s) for the subnet (the default is the whole CIDR).

source

pub fn set_cidr(&mut self, value: IpNet)

Set CIDR of the subnet.

source

pub fn with_cidr(self, value: IpNet) -> Self

Set CIDR of the subnet.

source

pub fn set_description<S: Into<String>>(&mut self, value: S)

Set description of the subnet.

source

pub fn with_description<S: Into<String>>(self, value: S) -> Self

Set description of the subnet.

source

pub fn set_dhcp_enabled(&mut self, value: bool)

Configure whether DHCP is enabled (true by default).

source

pub fn with_dhcp_enabled(self, value: bool) -> Self

Configure whether DHCP is enabled (true by default).

source

pub fn add_dns_nameserver<S: Into<String>>(&mut self, value: S)

DNS nameserver(s) for the subnet.

source

pub fn dns_nameservers(&mut self) -> &mut Vec<String>

DNS nameserver(s) for the subnet.

source

pub fn with_dns_nameserver<S: Into<String>>(self, value: S) -> Self

DNS nameserver(s) for the subnet.

source

pub fn add_host_route(&mut self, value: HostRoute)

Host route(s) for the subnet.

source

pub fn host_routes(&mut self) -> &mut Vec<HostRoute>

Host route(s) for the subnet.

source

pub fn with_host_route(self, value: HostRoute) -> Self

Host route(s) for the subnet.

source

pub fn set_ipv6_address_mode(&mut self, value: Ipv6Mode)

Set IPv6 address assignment mode.

source

pub fn with_ipv6_address_mode(self, value: Ipv6Mode) -> Self

Set IPv6 address assignment mode.

source

pub fn set_ipv6_router_advertisement_mode(&mut self, value: Ipv6Mode)

Set IPv6 router advertisement mode.

source

pub fn with_ipv6_router_advertisement_mode(self, value: Ipv6Mode) -> Self

Set IPv6 router advertisement mode.

source

pub fn set_name<S: Into<String>>(&mut self, value: S)

Set a name for the subnet.

source

pub fn with_name<S: Into<String>>(self, value: S) -> Self

Set a name for the subnet.

source

pub fn set_network<N>(&mut self, value: N)where N: Into<NetworkRef>,

Set the network of the subnet.

source

pub fn with_network<N>(self, value: N) -> Selfwhere N: Into<NetworkRef>,

Set the network of the subnet.

Trait Implementations§

source§

impl Clone for NewSubnet

source§

fn clone(&self) -> NewSubnet

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NewSubnet

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more