[][src]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.

Digital Ocean Documentation.

Implementations

impl Size[src]

pub fn slug(&self) -> &String[src]

A human-readable string that is used to uniquely identify each size.

pub fn available(&self) -> &bool[src]

This is a boolean value that represents whether new Droplets can be created with this size.

pub fn transfer(&self) -> &f64[src]

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.

pub fn price_monthly(&self) -> &f64[src]

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.

pub fn price_hourly(&self) -> &f64[src]

This describes the price of the Droplet size as measured hourly. The value is measured in US dollars.

pub fn memory(&self) -> &usize[src]

The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes.

pub fn vcpus(&self) -> &usize[src]

The number of virtual CPUs allocated to Droplets of this size.

pub fn disk(&self) -> &usize[src]

The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes.

pub fn regions(&self) -> &Vec<String>[src]

An array containing the region slugs where this size is available for Droplet creates.

impl Size[src]

Trait Implementations

impl Clone for Size[src]

impl Debug for Size[src]

impl<'de> Deserialize<'de> for Size[src]

impl Serialize for Size[src]

Auto Trait Implementations

impl RefUnwindSafe for Size

impl Send for Size

impl Sync for Size

impl Unpin for Size

impl UnwindSafe for Size

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

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