Struct compose_spec::Compose

source ·
pub struct Compose {
    pub version: Option<String>,
    pub name: Option<Name>,
    pub include: Vec<ShortOrLong<PathBuf, Include>>,
    pub services: IndexMap<Identifier, Service>,
    pub networks: Networks,
    pub volumes: Volumes,
    pub configs: Configs,
    pub secrets: Secrets,
    pub extensions: Extensions,
}
Expand description

The Compose file is a YAML file defining a containers based application.

Note that the Deserialize implementations of many types within Compose make use of Deserializer::deserialize_any(). This means that you should only attempt to deserialize from self-describing formats like YAML or JSON.

compose-spec

Fields§

§version: Option<String>

Declared for backward compatibility, ignored.

compose-spec

§name: Option<Name>

Define the Compose project name, until user defines one explicitly.

compose-spec

§include: Vec<ShortOrLong<PathBuf, Include>>

Compose sub-projects to be included.

compose-spec

§services: IndexMap<Identifier, Service>

The Services (containerized computing components) of the application.

compose-spec

§networks: Networks

Named networks for Services to communicate with each other.

compose-spec

§volumes: Volumes

Named volumes which can be reused across multiple Services.

Volumes are persistent data stores implemented by the container engine.

compose-spec

§configs: Configs

Configs allow Services to adapt their behavior without needing to rebuild the container image.

compose-spec

§secrets: Secrets

Sensitive data that a Service may be granted access to.

compose-spec

§extensions: Extensions

Extension values, which are (de)serialized via flattening.

compose-spec

Trait Implementations§

source§

impl Clone for Compose

source§

fn clone(&self) -> Compose

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Compose

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for Compose

source§

fn default() -> Compose

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Compose

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for Compose

source§

fn eq(&self, other: &Compose) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Compose

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for Compose

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,