Struct docker_compose::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

Where do we get these volumes from?

What permissions should we apply to these volumes?

Methods

impl VolumesFrom
[src]

Construct a VolumesFrom object using the name of a service in this docker-compose.yml file.

use docker_compose::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")
};Run

Construct a VolumesFrom object using the name of a Docker container defined elsewhere.

use docker_compose::v2 as dc;
let vf = dc::VolumesFrom::container("mycontainer");
assert_eq!(vf.source,
           dc::ServiceOrContainer::Container("mycontainer".to_owned()));Run

Trait Implementations

impl Eq for VolumesFrom
[src]

impl PartialEq for VolumesFrom
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for VolumesFrom
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for VolumesFrom
[src]

Formats the value using the given formatter.

impl Display for VolumesFrom
[src]

Formats the value using the given formatter.

impl FromStr for VolumesFrom
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more