pub trait ContainerExt: Sized {
Show 26 methods
// Required methods
fn new(name: impl ToString) -> Self;
fn command(self, command: impl IntoIterator<Item = impl ToString>) -> Self;
fn env(self, env: impl IntoIterator<Item = impl ToEnvVar>) -> Self;
fn env_from(self, env: impl IntoIterator<Item = impl ToEnvFrom>) -> Self;
fn image(self, image: impl ToString) -> Self;
fn image_pull_policy(self, policy: impl ToString) -> Self;
fn ports(self, ports: impl IntoIterator<Item = ContainerPort>) -> Self;
fn security_context(self, security_context: SecurityContext) -> Self;
fn liveness_probe(self, probe: Probe) -> Self;
fn readiness_probe(self, probe: Probe) -> Self;
fn resource_limits(
self,
limits: impl IntoIterator<Item = (String, Quantity)>,
) -> Self;
fn resource_requests(
self,
requests: impl IntoIterator<Item = (String, Quantity)>,
) -> Self;
fn startup_probe(self, probe: Probe) -> Self;
fn volume_mounts(
self,
volume_mounts: impl IntoIterator<Item = VolumeMount>,
) -> Self;
fn security_context_mut(&mut self) -> &mut SecurityContext;
fn working_dir(self, dir: impl ToString) -> Self;
// Provided methods
fn image_pull_policy_always(self) -> Self { ... }
fn image_pull_policy_never(self) -> Self { ... }
fn allow_privilege_escalation(self, yes: bool) -> Self { ... }
fn read_only_root_filesystem(self, yes: bool) -> Self { ... }
fn run_as_user(self, user: i64) -> Self { ... }
fn run_as_group(self, group: i64) -> Self { ... }
fn run_as_non_root(self, yes: bool) -> Self { ... }
fn privileged(self, yes: bool) -> Self { ... }
fn add_capabilities(
self,
capabilities: impl IntoIterator<Item = impl ToString>,
) -> Self { ... }
fn drop_capabilities(
self,
capabilities: impl IntoIterator<Item = impl ToString>,
) -> Self { ... }
}
Required Methods§
fn new(name: impl ToString) -> Self
fn command(self, command: impl IntoIterator<Item = impl ToString>) -> Self
fn env(self, env: impl IntoIterator<Item = impl ToEnvVar>) -> Self
fn env_from(self, env: impl IntoIterator<Item = impl ToEnvFrom>) -> Self
fn image(self, image: impl ToString) -> Self
fn image_pull_policy(self, policy: impl ToString) -> Self
fn ports(self, ports: impl IntoIterator<Item = ContainerPort>) -> Self
fn security_context(self, security_context: SecurityContext) -> Self
fn liveness_probe(self, probe: Probe) -> Self
fn readiness_probe(self, probe: Probe) -> Self
fn resource_limits( self, limits: impl IntoIterator<Item = (String, Quantity)>, ) -> Self
fn resource_requests( self, requests: impl IntoIterator<Item = (String, Quantity)>, ) -> Self
fn startup_probe(self, probe: Probe) -> Self
fn volume_mounts( self, volume_mounts: impl IntoIterator<Item = VolumeMount>, ) -> Self
fn security_context_mut(&mut self) -> &mut SecurityContext
fn working_dir(self, dir: impl ToString) -> Self
Provided Methods§
fn image_pull_policy_always(self) -> Self
fn image_pull_policy_never(self) -> Self
fn allow_privilege_escalation(self, yes: bool) -> Self
fn read_only_root_filesystem(self, yes: bool) -> Self
fn run_as_user(self, user: i64) -> Self
fn run_as_group(self, group: i64) -> Self
fn run_as_non_root(self, yes: bool) -> Self
fn privileged(self, yes: bool) -> Self
Sourcefn add_capabilities(
self,
capabilities: impl IntoIterator<Item = impl ToString>,
) -> Self
fn add_capabilities( self, capabilities: impl IntoIterator<Item = impl ToString>, ) -> Self
Add capabilities
to ‘add’ list
Sourcefn drop_capabilities(
self,
capabilities: impl IntoIterator<Item = impl ToString>,
) -> Self
fn drop_capabilities( self, capabilities: impl IntoIterator<Item = impl ToString>, ) -> Self
Add capabilities
to ‘drop’ list
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.