Skip to main content

Volume

Struct Volume 

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

One application-level volume declaration.

Implementations§

Source§

impl Volume

Source

pub const fn new(name: Identifier, ownership: ResourceOwnership) -> Self

Creates a volume declaration without inferring native defaults or names.

Source

pub const fn name(&self) -> &Identifier

Returns the neutral resource name.

Source

pub const fn ownership(&self) -> ResourceOwnership

Returns the resource lifecycle owner.

Source

pub fn set_runtime_name(&mut self, name: Sourced<ProtectedString>)

Sets the explicit runtime name, distinct from the logical resource key.

Source

pub const fn runtime_name(&self) -> Option<&Sourced<ProtectedString>>

Returns the explicit provider/runtime name.

Source

pub fn set_service_name(&mut self, name: Sourced<ProtectedString>)

Sets the explicit service-manager unit name without changing its spelling.

Source

pub const fn service_name(&self) -> Option<&Sourced<ProtectedString>>

Returns the explicit service-manager unit name.

Source

pub fn set_driver(&mut self, driver: Sourced<ProtectedString>)

Sets the source-authored volume driver spelling.

Source

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

Returns the explicit volume driver spelling.

Source

pub fn set_device(&mut self, device: Sourced<ProtectedString>)

Sets the source-authored local-driver device spelling.

Source

pub const fn device(&self) -> Option<&Sourced<ProtectedString>>

Returns the explicit local-driver device spelling.

Source

pub fn set_volume_type(&mut self, volume_type: Sourced<ProtectedString>)

Sets the source-authored local-driver type spelling.

Source

pub const fn volume_type(&self) -> Option<&Sourced<ProtectedString>>

Returns the explicit local-driver type spelling.

Source

pub fn set_options(&mut self, options: Sourced<ProtectedString>)

Sets the explicit singleton local-driver options spelling.

This is intentionally not a generic option bag: it retains the reviewed Options= setting, including the Compose local-driver driver_opts.o mapping.

Source

pub const fn options(&self) -> Option<&Sourced<ProtectedString>>

Returns the explicit singleton local-driver options spelling.

Source

pub fn set_labels(&mut self, labels: Vec<Sourced<MetadataLabel>>)

Sets metadata labels, retaining omission separately from an explicit empty reset.

Source

pub fn set_labels_with_origins( &mut self, labels: Vec<Sourced<MetadataLabel>>, origins: Vec<Provenance>, )

Sets metadata labels with collection-level provenance.

Source

pub fn add_label(&mut self, label: Sourced<MetadataLabel>)

Appends one metadata label in source order.

Source

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

Returns metadata labels in authored order, preserving omitted versus explicit-empty state.

Source

pub fn labels_origins(&self) -> &[Provenance]

Returns collection-level label provenance.

Source

pub fn set_copy(&mut self, copy: Sourced<bool>)

Sets the explicit copy choice without inferring an omitted source default.

Source

pub const fn copy(&self) -> Option<&Sourced<bool>>

Returns the explicit copy choice.

Source

pub fn set_containers_conf_modules( &mut self, values: Vec<Sourced<ProtectedString>>, )

Sets ordered protected containers.conf modules, retaining an explicit empty reset.

Source

pub fn set_containers_conf_modules_with_origins( &mut self, values: Vec<Sourced<ProtectedString>>, origins: Vec<Provenance>, )

Sets ordered protected containers.conf modules with collection-level provenance.

Source

pub fn containers_conf_modules(&self) -> Option<&[Sourced<ProtectedString>]>

Returns protected containers.conf modules in authored order, if explicitly present.

Source

pub fn containers_conf_modules_origins(&self) -> &[Provenance]

Returns collection-level containers.conf module provenance.

Source

pub fn set_global_args(&mut self, values: Vec<Sourced<ProtectedString>>)

Sets ordered protected global arguments, retaining an explicit empty reset.

Source

pub fn set_global_args_with_origins( &mut self, values: Vec<Sourced<ProtectedString>>, origins: Vec<Provenance>, )

Sets ordered protected global arguments with collection-level provenance.

Source

pub fn global_args(&self) -> Option<&[Sourced<ProtectedString>]>

Returns protected global arguments in authored order, if explicitly present.

Source

pub fn global_args_origins(&self) -> &[Provenance]

Returns collection-level global-argument provenance.

Source

pub fn set_podman_args(&mut self, values: Vec<Sourced<ProtectedString>>)

Sets ordered protected raw Podman arguments authored by the source.

These arguments are evidence only. Adapters must not synthesize them from typed settings.

Source

pub fn set_podman_args_with_origins( &mut self, values: Vec<Sourced<ProtectedString>>, origins: Vec<Provenance>, )

Sets raw Podman arguments with collection-level provenance.

Source

pub fn podman_args(&self) -> Option<&[Sourced<ProtectedString>]>

Returns source-authored raw Podman arguments in order, if explicitly present.

Source

pub fn podman_args_origins(&self) -> &[Provenance]

Returns collection-level raw-Podman-argument provenance.

Source

pub fn set_user(&mut self, user: Sourced<ProtectedString>)

Sets the source-authored volume user identity.

Source

pub const fn user(&self) -> Option<&Sourced<ProtectedString>>

Returns the source-authored volume user identity.

Source

pub fn set_group(&mut self, group: Sourced<ProtectedString>)

Sets the source-authored volume group identity.

Source

pub const fn group(&self) -> Option<&Sourced<ProtectedString>>

Returns the source-authored volume group identity.

Source

pub fn set_uid(&mut self, uid: Sourced<ProtectedString>)

Sets the source-authored numeric user-ID spelling.

Source

pub const fn uid(&self) -> Option<&Sourced<ProtectedString>>

Returns the source-authored numeric user-ID spelling.

Source

pub fn set_gid(&mut self, gid: Sourced<ProtectedString>)

Sets the source-authored numeric group-ID spelling.

Source

pub const fn gid(&self) -> Option<&Sourced<ProtectedString>>

Returns the source-authored numeric group-ID spelling.

Source

pub fn set_image_source( &mut self, image_source: Sourced<VolumeImageSource>, ) -> Result<(), ModelError>

Sets the explicitly selected image source for an image-backed volume.

Artifact references are checked by Application::validate_image_artifact_references after a complete application graph has been assembled.

§Errors

Returns ModelError::EmptyValue or ModelError::ContainsNul for an invalid literal image source.

Source

pub const fn image_source(&self) -> Option<&Sourced<VolumeImageSource>>

Returns the explicitly selected image source for an image-backed volume.

Trait Implementations§

Source§

impl Clone for Volume

Source§

fn clone(&self) -> Volume

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 Volume

Source§

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

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

impl Eq for Volume

Source§

impl PartialEq for Volume

Source§

fn eq(&self, other: &Volume) -> 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 Volume

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