Struct libcnb_data::buildpack::BuildpackToml[][src]

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

Data structure for the Buildpack descriptor (buildpack.toml).

Examples

use libcnb_data::buildpack::BuildpackToml;

let toml_str = r#"
api = "0.6"

[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"

[[stacks]]
id = "io.buildpacks.stacks.bionic"
mixins = ["yj", "yq"]

[metadata]
checksum = "awesome"
"#;

let result = toml::from_str::<BuildpackToml<toml::value::Table>>(toml_str);
assert!(result.is_ok());

Fields

api: BuildpackApibuildpack: Buildpackstacks: Vec<Stack>order: Vec<Order>metadata: BM

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.