Struct cage::Pod [−][src]
pub struct Pod { /* fields omitted */ }
A pod, specified by pods/$NAME.yml
and zero or more
pods/targets/*/*.yml
targets that we can apply to it.
Implementations
impl Pod
[src]
impl Pod
[src]pub fn service_names(&self) -> &BTreeSet<String>
[src]
pub fn service_names(&self) -> &BTreeSet<String>
[src]Get the names of the services declared in this pod.
pub fn enabled_in(&self, target: &Target) -> bool
[src]
pub fn enabled_in(&self, target: &Target) -> bool
[src]Is this pod enabled in the specified target?
pub fn rel_path(&self) -> &Path
[src]
pub fn rel_path(&self) -> &Path
[src]The path to the top-level file defining this pod, relative to the
base_dir
specified at creation time.
pub fn file(&self) -> &File
[src]
pub fn file(&self) -> &File
[src]The top-level file defining this pod. This is normalized to
include the appropriate env_file
entries, but if you want to do
more complicated transformations, you’ll need to clone it with
to_owned()
first.
pub fn target_rel_path(&self, target: &Target) -> Result<&Path>
[src]
pub fn target_rel_path(&self, target: &Target) -> Result<&Path>
[src]The path to the specificied target file for this pod.
pub fn target_file(&self, target: &Target) -> Result<&File>
[src]
pub fn target_file(&self, target: &Target) -> Result<&File>
[src]The dc::File
for this target.
pub fn merged_file(&self, target: &Target) -> Result<File>
[src]
pub fn merged_file(&self, target: &Target) -> Result<File>
[src]Return the base file and the target file merged into a single
docker-compose.yml
file.
pub fn target_files(&self) -> TargetFiles<'_>ⓘNotable traits for TargetFiles<'a>
impl<'a> Iterator for TargetFiles<'a> type Item = (&'a Target, &'a File);
[src]
pub fn target_files(&self) -> TargetFiles<'_>ⓘNotable traits for TargetFiles<'a>
impl<'a> Iterator for TargetFiles<'a> type Item = (&'a Target, &'a File);
[src]All the targets associated with this pod.
pub fn all_files(&self) -> AllFiles<'_>ⓘ
[src]
pub fn all_files(&self) -> AllFiles<'_>ⓘ
[src]Iterate over all dc::File
objects associated with this pod, including
both the main file()
and all the files in target_files()
.
pub fn service(&self, target: &Target, name: &str) -> Result<Option<Service>>
[src]
pub fn service(&self, target: &Target, name: &str) -> Result<Option<Service>>
[src]Look up a service by name.
pub fn service_or_err(&self, target: &Target, name: &str) -> Result<Service>
[src]
pub fn service_or_err(&self, target: &Target, name: &str) -> Result<Service>
[src]Like service
, but returns an error if the service can’t be found.
pub fn compose_args(&self, proj: &Project) -> Result<Vec<OsString>>
[src]
pub fn compose_args(&self, proj: &Project) -> Result<Vec<OsString>>
[src]Command-line -p
and -f
arguments that we’ll pass to
docker-compose
to describe this file.
pub fn run_script<CR>(
&self,
runner: &CR,
project: &Project,
service_name: &str,
script_name: &str,
opts: &Run
) -> Result<()> where
CR: CommandRunner,
[src]
pub fn run_script<CR>(
&self,
runner: &CR,
project: &Project,
service_name: &str,
script_name: &str,
opts: &Run
) -> Result<()> where
CR: CommandRunner,
[src]Run a named script for specified service name
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Pod
impl Send for Pod
impl Sync for Pod
impl Unpin for Pod
impl UnwindSafe for Pod
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,