pub struct ContainerBuilder { /* private fields */ }
Implementations§
Source§impl ContainerBuilder
impl ContainerBuilder
pub fn with_name(self, name: &str) -> Self
pub fn with_command(self, cmd: &str) -> Self
pub fn with_env(self, key: &str, value: &(dyn ToString + Send + Sync)) -> Self
pub fn with_envs(self, envs: &[(&str, &(dyn ToString + Send + Sync))]) -> Self
pub fn with_cpu_limit(self, cpu: f32) -> Self
pub fn with_ram_limit(self, ram: i64) -> Self
pub fn with_swap_limit(self, swap: i64) -> Self
pub fn with_enable_tty(self) -> Self
pub fn with_disable_tty(self) -> Self
pub fn with_network(self, network: &str) -> Self
pub fn with_port_binding( self, port: u16, host_port: Option<u16>, host_ip: Option<&str>, ) -> Self
pub fn with_port_bindings( self, bindings: &[(u16, Option<u16>, Option<&str>)], ) -> Self
pub fn with_volume_binding(self, host_path: &str, container_path: &str) -> Self
pub fn with_volume_bindings(self, bindings: &[(&str, &str)]) -> Self
pub async fn build(&self, docker: &Docker) -> Result<Container>
Trait Implementations§
Source§impl Debug for ContainerBuilder
impl Debug for ContainerBuilder
Source§impl Default for ContainerBuilder
impl Default for ContainerBuilder
Source§fn default() -> ContainerBuilder
fn default() -> ContainerBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContainerBuilder
impl RefUnwindSafe for ContainerBuilder
impl Send for ContainerBuilder
impl Sync for ContainerBuilder
impl Unpin for ContainerBuilder
impl UnwindSafe for ContainerBuilder
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