Struct compose_yml::v2::VolumesFrom
[−]
[src]
pub struct VolumesFrom { pub source: ServiceOrContainer, pub permissions: VolumePermissions, // some fields omitted }
Mount the volumes defined by another container into this one.
Fields
source: ServiceOrContainer
Where do we get these volumes from?
permissions: VolumePermissions
What permissions should we apply to these volumes?
Methods
impl VolumesFrom
[src]
fn service<S: Into<String>>(service: S) -> VolumesFrom
[src]
Construct a VolumesFrom
object using the name of a service in
this docker-compose.yml
file.
use compose_yml::v2 as dc; let vf = dc::VolumesFrom::service("myservice"); assert_eq!(vf.source, dc::ServiceOrContainer::Service("myservice".to_owned())); // To override a field, try: dc::VolumesFrom { permissions: dc::VolumePermissions::ReadOnly, ..dc::VolumesFrom::service("myservice") };
fn container<S: Into<String>>(container: S) -> VolumesFrom
[src]
Construct a VolumesFrom
object using the name of a Docker
container defined elsewhere.
use compose_yml::v2 as dc; let vf = dc::VolumesFrom::container("mycontainer"); assert_eq!(vf.source, dc::ServiceOrContainer::Container("mycontainer".to_owned()));
Trait Implementations
impl Debug for VolumesFrom
[src]
impl Clone for VolumesFrom
[src]
fn clone(&self) -> VolumesFrom
[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 VolumesFrom
[src]
fn eq(&self, __arg_0: &VolumesFrom) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &VolumesFrom) -> bool
[src]
This method tests for !=
.
impl Eq for VolumesFrom
[src]
impl Display for VolumesFrom
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more