pub struct ContainerConfig {Show 20 fields
pub docker_name: Option<String>,
pub docker_user: Option<String>,
pub docker_context: Option<String>,
pub docker_runtime: Option<String>,
pub podman_name: Option<String>,
pub podman_user: Option<String>,
pub podman_runtime: Option<String>,
pub nerdctl_name: Option<String>,
pub nerdctl_user: Option<String>,
pub nerdctl_runtime: Option<String>,
pub compose_service: Option<String>,
pub compose_user: Option<String>,
pub compose_files: Vec<String>,
pub compose_project: Option<String>,
pub compose_runtime: Option<String>,
pub kubectl_pod: Option<String>,
pub kubectl_container: Option<String>,
pub kubectl_namespace: Option<String>,
pub kubectl_context: Option<String>,
pub kubectl_runtime: Option<String>,
}Expand description
One flag family per driver, one field per (driver, option) pair.
Which options a driver supports is expressed by the field names themselves:
there is no kubectl_user because kubectl exec has no exec-as-user
option, and no podman_context because Podman has no context selection.
The only combination left to check is that a caller stayed inside one family.
Fields§
§docker_name: Option<String>§docker_user: Option<String>§docker_context: Option<String>§docker_runtime: Option<String>§podman_name: Option<String>§podman_user: Option<String>§podman_runtime: Option<String>§nerdctl_name: Option<String>§nerdctl_user: Option<String>§nerdctl_runtime: Option<String>§compose_service: Option<String>§compose_user: Option<String>§compose_files: Vec<String>§compose_project: Option<String>§compose_runtime: Option<String>§kubectl_pod: Option<String>§kubectl_container: Option<String>§kubectl_namespace: Option<String>§kubectl_context: Option<String>§kubectl_runtime: Option<String>Implementations§
Source§impl ContainerConfig
impl ContainerConfig
pub fn has_transport_fields(&self) -> bool
Sourcepub fn selected_driver(&self) -> Result<Option<ContainerDriver>, String>
pub fn selected_driver(&self) -> Result<Option<ContainerDriver>, String>
Which driver family the caller used, or None for no container
transport at all.
Two families at once is the one combination this surface still has to reject, and the error names both offending flags.
Sourcepub fn target_name(&self) -> Option<&str>
pub fn target_name(&self) -> Option<&str>
The container, service, or pod this session execs into, whichever family named it.
Sourcepub fn runtime_override(&self) -> Option<&str>
pub fn runtime_override(&self) -> Option<&str>
The runtime command override, whichever family named it.
Trait Implementations§
Source§impl Clone for ContainerConfig
impl Clone for ContainerConfig
Source§fn clone(&self) -> ContainerConfig
fn clone(&self) -> ContainerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContainerConfig
impl Debug for ContainerConfig
Source§impl Default for ContainerConfig
impl Default for ContainerConfig
Source§fn default() -> ContainerConfig
fn default() -> ContainerConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ContainerConfig
impl<'de> Deserialize<'de> for ContainerConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ContainerConfig
impl RefUnwindSafe for ContainerConfig
impl Send for ContainerConfig
impl Sync for ContainerConfig
impl Unpin for ContainerConfig
impl UnsafeUnpin for ContainerConfig
impl UnwindSafe for ContainerConfig
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