Struct docker_compose::v2::VolumeMount
[−]
[src]
pub struct VolumeMount { pub host: Option<HostVolume>, pub container: PathBuf, 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: PathBuf
Where should we mount this volume in the container? This must be an absolute path.
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<PathBuf>
Map a host path to a container path.
use docker_compose::v2 as dc; dc::VolumeMount::host("./src", "/app");Run
fn named<S, P>(name: S, container: P) -> VolumeMount where S: Into<String>, P: Into<PathBuf>
Map a named volume to a container path.
use docker_compose::v2 as dc; dc::VolumeMount::named("pgvolume", "/app");Run
fn anonymous<P>(container: P) -> VolumeMount where P: Into<PathBuf>
An anonymous persistent volume which will remain associated with this service when it is recreated.
Trait Implementations
impl Eq for VolumeMount
[src]
impl PartialEq for VolumeMount
[src]
fn eq(&self, __arg_0: &VolumeMount) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &VolumeMount) -> bool
This method tests for !=
.
impl Clone for VolumeMount
[src]
fn clone(&self) -> VolumeMount
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more