Struct mcai_docker::container::ContainerBuilder
source · [−]pub struct ContainerBuilder { /* private fields */ }Implementations
sourceimpl 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
sourceimpl Debug for ContainerBuilder
impl Debug for ContainerBuilder
sourceimpl Default for ContainerBuilder
impl Default for ContainerBuilder
sourcefn default() -> ContainerBuilder
fn default() -> ContainerBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ContainerBuilder
impl Send for ContainerBuilder
impl Sync for ContainerBuilder
impl Unpin for ContainerBuilder
impl UnwindSafe for ContainerBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more