Struct digitalocean::prelude::Volume
source · pub struct Volume { /* private fields */ }
Expand description
Block Storage volumes provide expanded storage capacity for your Droplets and can be moved between Droplets within a specific region. Volumes function as raw block devices, meaning they appear to the operating system as locally attached storage which can be formatted using any file system supported by the OS. They may be created in sizes from 1GiB to 16TiB.
Implementations§
source§impl Volume
impl Volume
sourcepub fn region(&self) -> &Region
pub fn region(&self) -> &Region
The region that the Block Storage volume is located in. When setting a region, the value should be the slug identifier for the region. When you query a Block Storage volume, the entire region object will be returned.
sourcepub fn droplet_ids(&self) -> &Vec<usize>
pub fn droplet_ids(&self) -> &Vec<usize>
An array containing the IDs of the Droplets the volume is attached to. Note that at this time, a volume can only be attached to a single Droplet.
sourcepub fn name(&self) -> &String
pub fn name(&self) -> &String
A human-readable name for the Block Storage volume. Must be lowercase and be composed only of numbers, letters and “-”, up to a limit of 64 characters.
sourcepub fn description(&self) -> &String
pub fn description(&self) -> &String
An optional free-form text field to describe a Block Storage volume.
sourcepub fn size_gigabytes(&self) -> &f32
pub fn size_gigabytes(&self) -> &f32
The size of the Block Storage volume in GiB (1024^3).
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 Block Storage volume was created.