Struct conductor::Override [] [src]

pub struct Override { /* fields omitted */ }

An Override is a collection of extensions to a project's basic pods. Overrides are typically used to represent deployment environments: test, development and production.

(Right now, this is deliberately a very thin wrapper around the name field, suitable for use as key in a BTreeMap. If you add more fields, you'll probably need to remove PartialEq, Eq, PartialOrd, Ord from the derive list, and either implement them manually or redesign the code that uses overrides as hash table keys.)

Methods

impl Override
[src]

Create a new override with the specified name.

Get the name of this override.

Check to see if this override should be included in some operation, given an optional enable_in_overrides overrides list. If no list is supplied, we'll act as those we were passed a default list including all overrides except test.

We have a weird calling convention because our typical callers are invoking us using a member field of a Config struct that they own.

let ovr = conductor::Override::new("development");
assert!(ovr.is_enabled_by(&None));
assert!(ovr.is_enabled_by(&Some(vec!["development".to_owned()])));
assert!(!ovr.is_enabled_by(&Some(vec!["production".to_owned()])));

let test_ovr = conductor::Override::new("test");
assert!(!test_ovr.is_enabled_by(&None));Run

Get a value for docker-compose's -p argument for a given project.

Trait Implementations

impl Debug for Override
[src]

Formats the value using the given formatter.

impl Clone for Override
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Override
[src]

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

This method tests for !=.

impl Eq for Override
[src]

impl PartialOrd for Override
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Override
[src]

This method returns an Ordering between self and other. Read more