pub struct OnBuild {
pub instruction: Box<Instruction>,
}Expand description
Represents an ONBUILD instruction.
use nanite_docker::{OnBuild, Instruction, Run};
let onbuild = OnBuild {
instruction: Box::new(Instruction::Run(Run{
argv: vec!["echo".into(), "hello".into()],
mounts: vec![],
network: None,
security: None,
})),
};
let onbuild_built = format!("{onbuild}");
assert_eq!(onbuild_built, r#"ONBUILD RUN ["echo", "hello"]"#);Fields§
§instruction: Box<Instruction>Trait Implementations§
Auto Trait Implementations§
impl Freeze for OnBuild
impl RefUnwindSafe for OnBuild
impl Send for OnBuild
impl Sync for OnBuild
impl Unpin for OnBuild
impl UnwindSafe for OnBuild
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