pub struct LaunchBuilder { /* private fields */ }
Expand description

A non-consuming builder for Launch values.

Examples

use libcnb_data::launch::{LaunchBuilder, ProcessBuilder};
use libcnb_data::process_type;

let launch_toml = LaunchBuilder::new()
    .process(
        ProcessBuilder::new(process_type!("web"), "bundle")
            .args(vec!["exec", "ruby", "app.rb"])
            .build(),
    )
    .build();

assert!(toml::to_string(&launch_toml).is_ok());

Implementations§

Adds a process to the launch configuration.

Adds multiple processes to the launch configuration.

Adds a label to the launch configuration.

Adds multiple processes to the launch configuration.

Adds a slice to the launch configuration.

Adds multiple slices to the launch configuration.

Builds the Launch based on the configuration of this builder.

Trait Implementations§

Returns the “default value” for a type. 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

Returns the argument unchanged.

Calls U::from(self).

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

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.