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]

pub fn name(&self) -> &str[src]

Get the name of this pod.

pub fn pod_type(&self) -> PodType[src]

Get the type of this pod.

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]

Is this pod enabled in the specified target?

pub fn base_dir(&self) -> &Path[src]

The base directory for our relative paths.

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]

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]

The path to the specificied target file for this pod.

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]

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]

All the targets associated with this pod.

pub fn all_files(&self) -> AllFiles<'_>

Notable traits for AllFiles<'a>

impl<'a> Iterator for AllFiles<'a> type Item = &'a File;
[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]

Look up a service by name.

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]

Command-line -p and -f arguments that we’ll pass to docker-compose to describe this file.

pub fn run_on_init(&self) -> &[Vec<String>][src]

The commands we should run to initialize this pod.

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

impl Debug for Pod[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

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> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> GetTypeId for T where
    T: Any

fn typeid(&self) -> TypeId

impl<T> Instrument for T[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]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T> Instrument for T[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]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

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

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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

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

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

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

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Err>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Err>

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V