pub struct TopLevelVolume {
pub external: Option<bool>,
pub name: Option<String>,
pub driver: Option<String>,
pub driver_opts: BTreeMap<String, SingleValue>,
pub labels: Option<ListOrMap>,
}Expand description
Volume configuration for the Compose application.
See more: https://docs.docker.com/reference/compose-file/volumes/
Fields§
§external: Option<bool>If set to true, it specifies that this volume already exists on the platform and its lifecycle is managed outside of that of the application.
See more: https://docs.docker.com/reference/compose-file/volumes/#external
name: Option<String>Sets a custom name for a volume.
See more: https://docs.docker.com/reference/compose-file/volumes/#name
driver: Option<String>Specifies which volume driver should be used. If the driver is not available, Compose returns an error and doesn’t deploy the application.
driver_opts: BTreeMap<String, SingleValue>Specifies a list of options as key-value pairs to pass to the driver for this volume. The options are driver-dependent.
labels: Option<ListOrMap>Labels are used to add metadata to volumes. You can use either an array or a dictionary.
It’s recommended that you use reverse-DNS notation to prevent your labels from conflicting with those used by other software.
See more: https://docs.docker.com/reference/compose-file/volumes/#labels
Trait Implementations§
Source§impl Clone for TopLevelVolume
impl Clone for TopLevelVolume
Source§fn clone(&self) -> TopLevelVolume
fn clone(&self) -> TopLevelVolume
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TopLevelVolume
impl Debug for TopLevelVolume
Source§impl<'de> Deserialize<'de> for TopLevelVolume
impl<'de> Deserialize<'de> for TopLevelVolume
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for TopLevelVolume
impl PartialEq for TopLevelVolume
Source§fn eq(&self, other: &TopLevelVolume) -> bool
fn eq(&self, other: &TopLevelVolume) -> bool
self and other values to be equal, and is used by ==.