Struct digitalocean::api::Size
[−]
pub struct Size { /* fields omitted */ }
The sizes objects represent different packages of hardware resources that can be used for Droplets. When a Droplet is created, a size must be selected so that the correct resources can be allocated.
Each size represents a plan that bundles together specific sets of resources. This includes the amount of RAM, the number of virtual CPUs, disk space, and transfer. The size object also includes the pricing details and the regions that the size is available in.
Methods
impl Size
fn slug(&self) -> &String
A human-readable string that is used to uniquely identify each size.
fn available(&self) -> &bool
This is a boolean value that represents whether new Droplets can be created with this size.
fn transfer(&self) -> &f64
The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes.
fn price_monthly(&self) -> &f64
This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars.
fn price_hourly(&self) -> &f64
This describes the price of the Droplet size as measured hourly. The value is measured in US dollars.
fn memory(&self) -> &usize
The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes.
fn vcpus(&self) -> &usize
The number of virtual CPUs allocated to Droplets of this size.
fn disk(&self) -> &usize
The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes.
fn regions(&self) -> &Vec<String>
An array containing the region slugs where this size is available for Droplet creates.
impl Size
[src]
fn list() -> SizeRequest<List, Vec<Size>>
Trait Implementations
impl Debug for Size
[src]
impl Clone for Size
[src]
fn clone(&self) -> Size
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more