Struct digitalocean::prelude::CustomImage
source · pub struct CustomImage { /* private fields */ }
Expand description
A custom image is an image with an user-supplied raw image. The body must contain a url attribute pointing to a Linux virtual machine image to be imported into DigitalOcean. The image must be in the raw, qcow2, vhdx, vdi, or vmdk format. It may be compressed using gzip or bzip2 and must be smaller than 100 GB after being decompressed.
Implementations§
source§impl CustomImage
impl CustomImage
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 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.
Tags to quickly find an image or to group multiple images under a common name
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.
sourcepub fn description(&self) -> &String
pub fn description(&self) -> &String
A brief description about the image
source§impl CustomImage
impl CustomImage
sourcepub fn create<S>(
name: S,
image_url: S,
region: S,
distribution: S,
desc: S,
tags: Vec<S>
) -> CustomImageRequest<Create, CustomImage>where
S: AsRef<str> + Display + Serialize,
pub fn create<S>(
name: S,
image_url: S,
region: S,
distribution: S,
desc: S,
tags: Vec<S>
) -> CustomImageRequest<Create, CustomImage>where
S: AsRef<str> + Display + Serialize,
Trait Implementations§
source§impl Clone for CustomImage
impl Clone for CustomImage
source§fn clone(&self) -> CustomImage
fn clone(&self) -> CustomImage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more