pub struct ShellBuilder {
pub executable: String,
pub params: Option<Vec<String>>,
}
Expand description
Builder struct for SHELL
instruction
Format according to Dockerfile reference:
SHELL ["executable", "params"]
Example:
// build SHELL with params
let shell = ShellBuilder::builder()
.executable("cmd")
.param("/S")
.param("/C")
.build().unwrap();
assert_eq!(shell.to_string(), r#"SHELL ["cmd", "/S", "/C"]"#);
// build SHELL with a param vec
let shell = ShellBuilder::builder()
.executable("cmd")
.params(vec!["/S", "/C"])
.build().unwrap();
assert_eq!(shell.to_string(), r#"SHELL ["cmd", "/S", "/C"]"#);
Fields§
§executable: String
§params: Option<Vec<String>>
Implementations§
Source§impl ShellBuilder
impl ShellBuilder
Sourcepub fn builder() -> ShellBuilderInner
pub fn builder() -> ShellBuilderInner
Builder implementation - All set methods can be found in ShellBuilderInner
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShellBuilder
impl RefUnwindSafe for ShellBuilder
impl Send for ShellBuilder
impl Sync for ShellBuilder
impl Unpin for ShellBuilder
impl UnwindSafe for ShellBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more