pub trait ToCommand:
Debug
+ Clone
+ Hash
+ Ord
+ PartialOrd
+ Eq
+ PartialEq
+ FromStr {
// Required method
fn to_args(&self) -> Vec<String>;
// Provided methods
fn has_args(&self) -> bool { ... }
fn command(&self) -> String { ... }
fn to_command(&self) -> Vec<String> { ... }
fn to_single_command(&self) -> String { ... }
fn to_single_arg(&self) -> String { ... }
}Required Methods§
Sourcefn to_args(&self) -> Vec<String>
fn to_args(&self) -> Vec<String>
Convert to a type suitable to pass to std::process::Command::args()
Provided Methods§
fn has_args(&self) -> bool
Sourcefn command(&self) -> String
fn command(&self) -> String
Convert to a type suitable to pass to std::process::Command::new()
Sourcefn to_command(&self) -> Vec<String>
fn to_command(&self) -> Vec<String>
Construct the full command in keep in pieces
Sourcefn to_single_command(&self) -> String
fn to_single_command(&self) -> String
Construct the full command as a single String
Sourcefn to_single_arg(&self) -> String
fn to_single_arg(&self) -> String
Construct only the args as a single String
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.