pub struct CommandTemplate { /* private fields */ }Expand description
A candidate program and the arguments placed before every case invocation.
Implementations§
Source§impl CommandTemplate
impl CommandTemplate
Sourcepub fn new(program: impl Into<OsString>) -> Self
pub fn new(program: impl Into<OsString>) -> Self
Creates a template that invokes program directly, without a shell.
Sourcepub fn with_args<I, S>(program: impl Into<OsString>, args: I) -> Self
pub fn with_args<I, S>(program: impl Into<OsString>, args: I) -> Self
Creates a template with native prefix arguments.
Sourcepub fn with_prefix_arg(self, arg: impl Into<OsString>) -> Self
pub fn with_prefix_arg(self, arg: impl Into<OsString>) -> Self
Appends one prefix argument and returns the updated template.
Sourcepub fn prefix_args(&self) -> &[OsString]
pub fn prefix_args(&self) -> &[OsString]
Returns the arguments placed before each case’s arguments.
Sourcepub fn report(&self) -> CommandReport
pub fn report(&self) -> CommandReport
Returns a report-safe, lossy projection of the native command.
Trait Implementations§
Source§impl Clone for CommandTemplate
impl Clone for CommandTemplate
Source§fn clone(&self) -> CommandTemplate
fn clone(&self) -> CommandTemplate
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 CommandTemplate
impl Debug for CommandTemplate
impl Eq for CommandTemplate
Source§impl PartialEq for CommandTemplate
impl PartialEq for CommandTemplate
impl StructuralPartialEq for CommandTemplate
Auto Trait Implementations§
impl Freeze for CommandTemplate
impl RefUnwindSafe for CommandTemplate
impl Send for CommandTemplate
impl Sync for CommandTemplate
impl Unpin for CommandTemplate
impl UnsafeUnpin for CommandTemplate
impl UnwindSafe for CommandTemplate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.