pub struct ContainerProcessDefinitionBuilder { /* private fields */ }Expand description
Builder for constructing a container process definition.
Implementations§
Source§impl ContainerProcessDefinitionBuilder
impl ContainerProcessDefinitionBuilder
Sourcepub fn with_image(&mut self, image: &str) -> &mut Self
pub fn with_image(&mut self, image: &str) -> &mut Self
Sets the container image to run.
Sourcepub fn with_command(&mut self, command: &str) -> &mut Self
pub fn with_command(&mut self, command: &str) -> &mut Self
Sets the command to execute inside the container.
Sourcepub fn with_ports(&mut self, ports: HashMap<String, Value>) -> &mut Self
pub fn with_ports(&mut self, ports: HashMap<String, Value>) -> &mut Self
Sets the port mappings for the container.
Sourcepub fn with_volumes(&mut self, volumes: HashMap<String, Value>) -> &mut Self
pub fn with_volumes(&mut self, volumes: HashMap<String, Value>) -> &mut Self
Sets the volume mounts for the container.
Sourcepub fn with_environment_variables(
&mut self,
env: HashMap<String, String>,
) -> &mut Self
pub fn with_environment_variables( &mut self, env: HashMap<String, String>, ) -> &mut Self
Replaces all environment variables with the provided map.
Sourcepub fn with_env(&mut self, key: &str, value: &str) -> &mut Self
pub fn with_env(&mut self, key: &str, value: &str) -> &mut Self
Adds a single environment variable to the container.
Sourcepub fn build(self) -> ContainerProcessDefinition
pub fn build(self) -> ContainerProcessDefinition
Builds the ContainerProcessDefinition.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContainerProcessDefinitionBuilder
impl RefUnwindSafe for ContainerProcessDefinitionBuilder
impl Send for ContainerProcessDefinitionBuilder
impl Sync for ContainerProcessDefinitionBuilder
impl Unpin for ContainerProcessDefinitionBuilder
impl UnsafeUnpin for ContainerProcessDefinitionBuilder
impl UnwindSafe for ContainerProcessDefinitionBuilder
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