pub struct VolumeBuilder<'a> { /* private fields */ }
Expand description

Builder for Volume.

Implementations§

source§

impl<'a> VolumeBuilder<'a>

source

pub fn name<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE ) -> &mut Self

The volume name.

source

pub fn description<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE ) -> &mut Self

The volume description.

source

pub fn display_name<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE ) -> &mut Self

source

pub fn display_description<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE ) -> &mut Self

source

pub fn volume_type<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE ) -> &mut Self

The volume type (either name or ID). To create an environment with multiple-storage back ends, you must specify a volume type. Block Storage volume back ends are spawned as children to cinder- volume, and they are keyed from a unique queue. They are named cinder- volume.HOST.BACKEND. For example, cinder- volume.ubuntu.lvmdriver. When a volume is created, the scheduler chooses an appropriate back end to handle the request based on the volume type. Default is None. For information about how to use volume types to create multiple- storage back ends, see Configure multiple-storage back ends.

source

pub fn snapshot_id<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE ) -> &mut Self

The UUID of the consistency group.

source

pub fn source_volid<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE ) -> &mut Self

The UUID of the consistency group.

source

pub fn consistencygroup_id<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE ) -> &mut Self

The UUID of the consistency group.

source

pub fn size<VALUE: Into<Option<i32>>>(&mut self, value: VALUE) -> &mut Self

The size of the volume, in gibibytes (GiB).

source

pub fn availability_zone<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE ) -> &mut Self

The name of the availability zone.

source

pub fn multiattach<VALUE: Into<Option<bool>>>( &mut self, value: VALUE ) -> &mut Self

To enable this volume to attach to more than one server, set this value to true. Default is false. Note that support for multiattach volumes depends on the volume type being used. See valid boolean values

source

pub fn image_id<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE ) -> &mut Self

source

pub fn image_ref<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE ) -> &mut Self

The UUID of the image from which you want to create the volume. Required to create a bootable volume.

source

pub fn build(&self) -> Result<Volume<'a>, VolumeBuilderError>

Builds a new Volume.

§Errors

If a required field has not been initialized.

source§

impl<'a> VolumeBuilder<'a>

source

pub fn metadata<I, K, V>(&mut self, iter: I) -> &mut Self
where I: Iterator<Item = (K, V)>, K: Into<Cow<'a, str>>, V: Into<Cow<'a, str>>,

One or more metadata key and value pairs to be associated with the new volume.

source

pub fn properties<I, K, V>(&mut self, iter: I) -> &mut Self
where I: Iterator<Item = (K, V)>, K: Into<Cow<'a, str>>, V: Into<Value>,

Trait Implementations§

source§

impl<'a> Clone for VolumeBuilder<'a>

source§

fn clone(&self) -> VolumeBuilder<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Default for VolumeBuilder<'a>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for VolumeBuilder<'a>

§

impl<'a> Send for VolumeBuilder<'a>

§

impl<'a> Sync for VolumeBuilder<'a>

§

impl<'a> Unpin for VolumeBuilder<'a>

§

impl<'a> UnwindSafe for VolumeBuilder<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more