Struct digitalocean::api::Volume
[−]
pub struct Volume { /* fields omitted */ }
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.
Methods
impl Volume
fn attach<S>(
volume_name: S,
droplet: usize
) -> VolumeActionRequest<Create, Action> where
S: AsRef<str> + Serialize + Display,
volume_name: S,
droplet: usize
) -> VolumeActionRequest<Create, Action> where
S: AsRef<str> + Serialize + Display,
fn detach<S>(
volume_name: S,
droplet: usize
) -> VolumeActionRequest<Create, Action> where
S: AsRef<str> + Serialize + Display,
volume_name: S,
droplet: usize
) -> VolumeActionRequest<Create, Action> where
S: AsRef<str> + Serialize + Display,
impl Volume
fn id(&self) -> &String
The unique identifier for the Block Storage volume.
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.
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.
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.
fn description(&self) -> &String
An optional free-form text field to describe a Block Storage volume.
fn size_gigabytes(&self) -> &usize
The size of the Block Storage volume in GiB (10243).
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.
impl Volume
[src]
fn list() -> VolumeRequest<List, Vec<Volume>>
fn create<S>(name: S, size_gigabytes: usize) -> VolumeRequest<Create, Volume> where
S: AsRef<str> + Serialize + Display,
S: AsRef<str> + Serialize + Display,
fn get<S>(id: S) -> VolumeRequest<Get, Volume> where
S: AsRef<str> + Serialize + Display,
S: AsRef<str> + Serialize + Display,
fn get_by_name<S>(name: S, region: S) -> VolumeRequest<Get, Volume> where
S: AsRef<str> + Serialize + Display,
S: AsRef<str> + Serialize + Display,
fn delete<S>(id: S) -> VolumeRequest<Delete, ()> where
S: AsRef<str> + Serialize + Display,
S: AsRef<str> + Serialize + Display,
fn delete_by_name<S>(name: S, region: S) -> VolumeRequest<Delete, ()> where
S: AsRef<str> + Serialize + Display,
S: AsRef<str> + Serialize + Display,
Trait Implementations
impl Debug for Volume
[src]
impl Clone for Volume
[src]
fn clone(&self) -> Volume
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more