Struct digitalocean::api::Image
source · pub struct Image { /* private fields */ }
Expand description
Images in DigitalOcean may refer to one of a few different kinds of objects.
An image may refer to a snapshot that has been taken of a Droplet instance. It may also mean an image representing an automatic backup of a Droplet. The third category that it can represent is a public Linux distribution or application image that is used as a base to create Droplets.
Implementations§
source§impl Image
impl Image
sourcepub fn id(&self) -> &usize
pub fn id(&self) -> &usize
A unique number that can be used to identify and reference a specific image.
sourcepub fn name(&self) -> &String
pub fn name(&self) -> &String
The display name that has been given to an image. This is what is shown in the control panel and is generally a descriptive title for the image in question.
sourcepub fn kind(&self) -> &String
pub fn kind(&self) -> &String
The kind of image, describing the duration of how long the image is stored. This is either “snapshot” or “backup”.
Note: Since type
is a keyword in Rust kind
is used instead.
sourcepub fn distribution(&self) -> &String
pub fn distribution(&self) -> &String
This attribute describes the base distribution used for this image.
sourcepub fn slug(&self) -> &Option<String>
pub fn slug(&self) -> &Option<String>
A uniquely identifying string that is associated with each of the DigitalOcean-provided public images. These can be used to reference a public image as an alternative to the numeric id.
sourcepub fn public(&self) -> &bool
pub fn public(&self) -> &bool
This is a boolean value that indicates whether the image in question is public or not. An image that is public is available to all accounts. A non-public image is only accessible from your account.
sourcepub fn regions(&self) -> &Vec<String>
pub fn regions(&self) -> &Vec<String>
This attribute is an array of the regions that the image is available in. The regions are represented by their identifying slug values.
sourcepub fn min_disk_size(&self) -> &usize
pub fn min_disk_size(&self) -> &usize
The minimum ‘disk’ required for a size to use this image.
sourcepub fn size_gigabytes(&self) -> &Option<f32>
pub fn size_gigabytes(&self) -> &Option<f32>
The size of the image in gigabytes.
sourcepub fn created_at(&self) -> &DateTime<Utc>
pub fn created_at(&self) -> &DateTime<Utc>
A time value given in ISO8601 combined date and time format that represents when the Image was created.
source§impl Image
impl Image
sourcepub fn distributions() -> ImageRequest<List, Vec<Image>>
pub fn distributions() -> ImageRequest<List, Vec<Image>>
sourcepub fn applications() -> ImageRequest<List, Vec<Image>>
pub fn applications() -> ImageRequest<List, Vec<Image>>
sourcepub fn get<S>(id: S) -> ImageRequest<Get, Image>where
S: Display,
pub fn get<S>(id: S) -> ImageRequest<Get, Image>where
S: Display,
id
is either an id
(numeric) or a slug
(string).
sourcepub fn update<S>(id: S) -> ImageRequest<Update, Image>where
S: Display,
pub fn update<S>(id: S) -> ImageRequest<Update, Image>where
S: Display,
id
is either an id
(numeric) or a slug
(string).