Struct compose_yml::v2::VolumeMount
[−]
[src]
pub struct VolumeMount { pub host: Option<HostVolume>, pub container: String, pub permissions: VolumePermissions, // some fields omitted }
A volume associated with a service.
Fields
host: Option<HostVolume>
If this volume is external to the container, where should we find it?
container: String
Where should we mount this volume in the container? This must be an absolute path. This is a string, because on Windows, it will use a different path representation than the host OS.
permissions: VolumePermissions
What should the permissions of this volume be in the container?
Methods
impl VolumeMount
[src]
fn host<P1, P2>(host: P1, container: P2) -> VolumeMount where
P1: Into<PathBuf>,
P2: Into<String>,
[src]
P1: Into<PathBuf>,
P2: Into<String>,
Map a host path to a container path.
use compose_yml::v2 as dc; dc::VolumeMount::host("./src", "/app");
fn named<S, P>(name: S, container: P) -> VolumeMount where
S: Into<String>,
P: Into<String>,
[src]
S: Into<String>,
P: Into<String>,
Map a named volume to a container path.
use compose_yml::v2 as dc; dc::VolumeMount::named("pgvolume", "/app");
fn anonymous<P>(container: P) -> VolumeMount where
P: Into<String>,
[src]
P: Into<String>,
An anonymous persistent volume which will remain associated with this service when it is recreated.
Trait Implementations
impl Debug for VolumeMount
[src]
impl Clone for VolumeMount
[src]
fn clone(&self) -> VolumeMount
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for VolumeMount
[src]
fn eq(&self, __arg_0: &VolumeMount) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &VolumeMount) -> bool
[src]
This method tests for !=
.
impl Eq for VolumeMount
[src]
impl Display for VolumeMount
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more