[][src]Struct digitalocean::api::Droplet

pub struct Droplet { /* fields omitted */ }

A Droplet is a DigitalOcean virtual machine. By sending requests to the Droplet endpoint, you can list, create, or delete Droplets.

Some of the attributes will have an object value. The region and image objects will all contain the standard attributes of their associated types. Find more information about each of these objects in their respective sections.

Digital Ocean Documentation.

Implementations

impl Droplet[src]

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

A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation.

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

The human-readable name set for the Droplet instance.

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

Memory of the Droplet in megabytes.

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

The number of virtual CPUs.

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

The size of the Droplet's disk in gigabytes.

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

A boolean value indicating whether the Droplet has been locked, preventing actions by users.

pub fn created_at(&self) -> &DateTime<Utc>[src]

A time value given in ISO8601 combined date and time format that represents when the Droplet was created.

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

A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive".

pub fn backup_ids(&self) -> &Vec<usize>[src]

An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation.

pub fn snapshot_ids(&self) -> &Vec<usize>[src]

An array of snapshot IDs of any snapshots created from the Droplet instance.

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

An array of features enabled on this Droplet.

pub fn region(&self) -> &Region[src]

The region that the Droplet instance is deployed in. When setting a region, the value should be the slug identifier for the region. When you query a Droplet, the entire region object will be returned.

pub fn image(&self) -> &Image[src]

The base image used to create the Droplet instance. When setting an image, the value is set to the image id or slug. When querying the Droplet, the entire image object will be returned.

pub fn size(&self) -> &Size[src]

The current size object describing the Droplet. When setting a size, the value is set to the size slug. When querying the Droplet, the entire size object will be returned. Note that the disk volume of a Droplet may not match the size's disk due to Droplet resize actions. The disk attribute on the Droplet should always be referenced.

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

The unique slug identifier for the size of this Droplet.

pub fn networks(&self) -> &Networks[src]

The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is.

pub fn kernel(&self) -> &Option<Kernel>[src]

The current kernel. This will initially be set to the kernel of the base image when the Droplet is created.

pub fn next_backup_window(&self) -> &Option<NextBackupWindow>[src]

The details of the Droplet's backups feature, if backups are configured for the Droplet. This object contains keys for the start and end times of the window during which the backup will start.

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

An array of Tags the Droplet has been tagged with.

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

A flat array including the unique identifier for each Block Storage volume attached to the Droplet.

impl Droplet[src]

pub fn create<S, D>(
    name: S,
    region: S,
    size: S,
    image: D
) -> DropletRequest<Create, Droplet> where
    S: AsRef<str> + Serialize + Display,
    D: Serialize + Display
[src]

pub fn create_multiple<S, D>(
    names: Vec<S>,
    region: S,
    size: S,
    image: D
) -> DropletRequest<Create, Vec<Droplet>> where
    S: AsRef<str> + Serialize + Display,
    D: Serialize + Display
[src]

pub fn get(id: usize) -> DropletRequest<Get, Droplet>[src]

pub fn list() -> DropletRequest<List, Vec<Droplet>>[src]

pub fn list_by_tag<S: AsRef<str> + Serialize>(
    name: S
) -> DropletRequest<List, Vec<Droplet>>
[src]

pub fn delete(id: usize) -> DropletRequest<Delete, ()>[src]

pub fn delete_by_tag<S: AsRef<str> + Serialize>(
    name: S
) -> DropletRequest<Delete, ()>
[src]

pub fn neighbors() -> DropletRequest<Get, Vec<Vec<Droplet>>>[src]

Trait Implementations

impl Clone for Droplet[src]

impl Debug for Droplet[src]

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

impl HasResponse for Droplet[src]

type Response = DropletResponse

impl Serialize for Droplet[src]

Auto Trait Implementations

impl RefUnwindSafe for Droplet

impl Send for Droplet

impl Sync for Droplet

impl Unpin for Droplet

impl UnwindSafe for Droplet

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