pub struct CommandWithCustomArgs(/* private fields */);
Expand description
A command with optional custom arguments, the command will be executed natively (native provider) or in a container (podman/k8s).
It can be constructed from an &str
, if it fails, it will returns a ConversionError
.
§Examples:
use zombienet_configuration::shared::types::CommandWithCustomArgs;
let command1: CommandWithCustomArgs = "mycommand --demo=2 --other-flag".try_into().unwrap();
let command2: CommandWithCustomArgs = "my_other_cmd_without_args".try_into().unwrap();
assert_eq!(command1.cmd().as_str(), "mycommand");
assert_eq!(command2.cmd().as_str(), "my_other_cmd_without_args");
Implementations§
Trait Implementations§
Source§impl Clone for CommandWithCustomArgs
impl Clone for CommandWithCustomArgs
Source§fn clone(&self) -> CommandWithCustomArgs
fn clone(&self) -> CommandWithCustomArgs
Returns a copy of the value. Read more
1.0.0 · 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 CommandWithCustomArgs
impl Debug for CommandWithCustomArgs
Source§impl Default for CommandWithCustomArgs
impl Default for CommandWithCustomArgs
Source§impl<'de> Deserialize<'de> for CommandWithCustomArgs
impl<'de> Deserialize<'de> for CommandWithCustomArgs
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
Source§impl PartialEq for CommandWithCustomArgs
impl PartialEq for CommandWithCustomArgs
Source§impl Serialize for CommandWithCustomArgs
impl Serialize for CommandWithCustomArgs
Source§impl TryFrom<&str> for CommandWithCustomArgs
impl TryFrom<&str> for CommandWithCustomArgs
impl StructuralPartialEq for CommandWithCustomArgs
Auto Trait Implementations§
impl Freeze for CommandWithCustomArgs
impl RefUnwindSafe for CommandWithCustomArgs
impl Send for CommandWithCustomArgs
impl Sync for CommandWithCustomArgs
impl Unpin for CommandWithCustomArgs
impl UnwindSafe for CommandWithCustomArgs
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