Skip to main content

GeneratedVolumeDefinition

Struct GeneratedVolumeDefinition 

Source
pub struct GeneratedVolumeDefinition { /* private fields */ }
Expand description

A top-level application-owned volume definition with optional driver configuration.

This type is intentionally distinct from GeneratedResource, which remains the compatible basic/external lifecycle API shared by top-level networks and volumes. External volumes cannot use this driver-configured API.

Implementations§

Source§

impl GeneratedVolumeDefinition

Source

pub fn application(name: impl Into<String>) -> Result<Self, GenerationError>

Creates an application-owned volume definition.

§Errors

Rejects an empty or NUL-bearing name.

Source

pub fn set_custom_name( &mut self, name: impl Into<String>, ) -> Result<(), GenerationError>

Sets the exact platform-level volume name once.

§Errors

Rejects an empty/NUL-bearing name and duplicate configuration.

Source

pub fn set_driver( &mut self, driver: GeneratedString, ) -> Result<(), GenerationError>

Sets one opaque volume driver exactly once.

No driver, plugin, provider, runtime, default, or image semantics validation is applied.

§Errors

Returns GenerationError::DuplicateField when already configured.

Source

pub fn set_driver_opts( &mut self, driver_opts: Vec<GeneratedVolumeDriverOption>, ) -> Result<(), GenerationError>

Sets the complete ordered unique volume driver-options mapping exactly once.

An empty mapping remains explicit. String and number YAML scalar identities are selected by GeneratedVolumeDriverOptionValue and are never inferred from their text.

§Errors

Rejects duplicate option names and duplicate field configuration. No driver-specific option, plugin, provider, runtime, default, or image semantics are validated.

Source

pub fn set_labels( &mut self, labels: Vec<GeneratedLabel>, ) -> Result<(), GenerationError>

Sets the complete ordered unique volume-label mapping exactly once.

An empty mapping remains explicit. Labels use the same explicit string-value contract as generated service labels, so neither key-only nor non-string label forms are generated.

§Errors

Rejects duplicate label names and duplicate field configuration. No provider, runtime, or injected-label equivalence is inferred.

Source

pub fn name(&self) -> &str

Returns the generated volume name.

Source

pub fn custom_name(&self) -> Option<&str>

Returns the optional exact platform-level volume name.

Source

pub const fn driver(&self) -> Option<&GeneratedString>

Returns the optional opaque volume driver.

Source

pub fn driver_opts(&self) -> Option<&[GeneratedVolumeDriverOption]>

Returns the optional ordered driver-options mapping, including an explicit empty map.

Source

pub fn labels(&self) -> Option<&[GeneratedLabel]>

Returns the optional ordered volume-label mapping, including an explicit empty map.

Trait Implementations§

Source§

impl Clone for GeneratedVolumeDefinition

Source§

fn clone(&self) -> GeneratedVolumeDefinition

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for GeneratedVolumeDefinition

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for GeneratedVolumeDefinition

Source§

impl PartialEq for GeneratedVolumeDefinition

Source§

fn eq(&self, other: &GeneratedVolumeDefinition) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for GeneratedVolumeDefinition

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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,

Source§

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>,

Source§

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>,

Source§

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.