Struct compose_yml::v2::File
[−]
[src]
pub struct File { pub version: String, pub services: BTreeMap<String, Service>, pub volumes: BTreeMap<String, Volume>, pub networks: BTreeMap<String, Network>, // some fields omitted }
A docker-compose.yml
file.
Fields
version: String
The version of the docker-compose.yml
file format. Must be 2.
services: BTreeMap<String, Service>
The individual services which make up this app.
volumes: BTreeMap<String, Volume>
Named volumes used by this app.
TODO MED: Can we parse just volume names followed by a colon?
networks: BTreeMap<String, Network>
The networks used by this app.
Methods
impl File
[src]
fn read<R>(r: R) -> Result<Self> where
R: Read,
[src]
R: Read,
Read a file from an input stream containing YAML.
fn write<W>(&self, w: &mut W) -> Result<()> where
W: Write,
[src]
W: Write,
Write a file to an output stream as YAML.
fn read_from_path<P>(path: P) -> Result<Self> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Read a file from the specified path.
fn write_to_path<P>(&self, path: P) -> Result<()> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Write a file to the specified path.
fn inline_all(&mut self, base: &Path) -> Result<()>
[src]
Inline all our external resources, such as env_files
, looking up
paths relative to base
.
fn make_standalone(&mut self, base: &Path) -> Result<()>
[src]
Convert this file to a standalone file, with no dependencies on the current environment or any external files. This does not lock down the image versions used in this file.
Trait Implementations
impl Debug for File
[src]
impl Clone for File
[src]
fn clone(&self) -> File
[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 File
[src]
fn eq(&self, __arg_0: &File) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &File) -> bool
[src]
This method tests for !=
.
impl Eq for File
[src]
impl InterpolateAll for File
[src]
Recursive merge all fields in the structure.
fn interpolate_all(&mut self) -> Result<()>
[src]
Recursively walk over this type, interpolating all RawOr
values containing references to the environment. The default implementation leaves a value unchanged. Read more
impl MergeOverride for File
[src]
Recursive merge all fields in the structure.
fn merge_override(&self, ovr: &Self) -> Self
[src]
Given this value and an override value, merge the override value into this one, producing a new value. Read more