[][src]Struct compose_yml::v2::VolumesFrom

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]

pub 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")
};

pub 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 Eq for VolumesFrom
[src]

impl PartialEq<VolumesFrom> for VolumesFrom
[src]

impl Clone for VolumesFrom
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for VolumesFrom
[src]

impl Display for VolumesFrom
[src]

impl FromStr for VolumesFrom
[src]

type Err = Error

The associated error which can be returned from parsing.

Auto Trait Implementations

impl Send for VolumesFrom

impl Sync for VolumesFrom

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.