pub struct MetaBuildpackDescriptor<BM> {
    pub api: BuildpackApi,
    pub buildpack: Buildpack,
    pub order: Vec<Order>,
    pub metadata: BM,
}
Expand description

Data structure for the Buildpack descriptor (buildpack.toml) of a meta-buildpack.

Representation of buildpack.toml when the buildpack is a meta-buildpack.

If support for multiple buildpack types is required, use BuildpackDescriptor instead.

Example:

use libcnb_data::buildpack_id;
use libcnb_data::buildpack::MetaBuildpackDescriptor;

let toml_str = r#"
api = "0.8"

[buildpack]
id = "foo/bar"
name = "Bar Buildpack"
version = "0.0.1"
homepage = "https://www.foo.com/bar"
clear-env = false
description = "A buildpack for Foo Bar"
keywords = ["foo"]

[[buildpack.licenses]]
type = "BSD-3-Clause"

[[order]]

[[order.group]]
id = "foo/baz"
version = "0.0.1"
"#;

let buildpack_descriptor = toml::from_str::<MetaBuildpackDescriptor<Option<toml::value::Table>>>(toml_str).unwrap();
assert_eq!(buildpack_descriptor.buildpack.id, buildpack_id!("foo/bar"));

Fields§

§api: BuildpackApi§buildpack: Buildpack§order: Vec<Order>§metadata: BM

Trait Implementations§

source§

impl<BM: Debug> Debug for MetaBuildpackDescriptor<BM>

source§

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

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

impl<'de, BM> Deserialize<'de> for MetaBuildpackDescriptor<BM>where
BM: Deserialize<'de>,

source§

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

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl<BM> RefUnwindSafe for MetaBuildpackDescriptor<BM>where
BM: RefUnwindSafe,

§

impl<BM> Send for MetaBuildpackDescriptor<BM>where
BM: Send,

§

impl<BM> Sync for MetaBuildpackDescriptor<BM>where
BM: Sync,

§

impl<BM> Unpin for MetaBuildpackDescriptor<BM>where
BM: Unpin,

§

impl<BM> UnwindSafe for MetaBuildpackDescriptor<BM>where
BM: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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, U> TryFrom<U> for Twhere
U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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