Struct digitalocean::api::Size
source · pub struct Size { /* private fields */ }
Expand description
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.
Implementations§
source§impl Size
impl Size
sourcepub fn slug(&self) -> &String
pub fn slug(&self) -> &String
A human-readable string that is used to uniquely identify each size.
sourcepub fn available(&self) -> &bool
pub fn available(&self) -> &bool
This is a boolean value that represents whether new Droplets can be created with this size.
sourcepub fn transfer(&self) -> &f64
pub 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.
sourcepub fn price_monthly(&self) -> &f64
pub 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.
sourcepub fn price_hourly(&self) -> &f64
pub fn price_hourly(&self) -> &f64
This describes the price of the Droplet size as measured hourly. The value is measured in US dollars.
sourcepub fn memory(&self) -> &usize
pub fn memory(&self) -> &usize
The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes.