pub enum ShellOrExecExpr {
Shell(BreakableString),
Exec(StringArray),
}Expand description
A string that may be broken across many lines or an array of strings.
Variants
Shell(BreakableString)
Exec(StringArray)
Implementations
sourceimpl ShellOrExecExpr
impl ShellOrExecExpr
sourcepub fn into_shell(self) -> Option<BreakableString>
pub fn into_shell(self) -> Option<BreakableString>
Unpacks this expression into its inner value if it is a Shell-form instruction, otherwise returns None.
sourcepub fn as_shell(&self) -> Option<&BreakableString>
pub fn as_shell(&self) -> Option<&BreakableString>
Unpacks this expression into its inner value if it is a Shell-form instruction, otherwise returns None.
sourcepub fn into_exec(self) -> Option<StringArray>
pub fn into_exec(self) -> Option<StringArray>
Unpacks this expression into its inner value if it is an Exec-form instruction, otherwise returns None.
sourcepub fn as_exec(&self) -> Option<&StringArray>
pub fn as_exec(&self) -> Option<&StringArray>
Unpacks this expression into its inner value if it is an Exec-form instruction, otherwise returns None.
Trait Implementations
sourceimpl Clone for ShellOrExecExpr
impl Clone for ShellOrExecExpr
sourcefn clone(&self) -> ShellOrExecExpr
fn clone(&self) -> ShellOrExecExpr
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ShellOrExecExpr
impl Debug for ShellOrExecExpr
sourceimpl PartialEq<ShellOrExecExpr> for ShellOrExecExpr
impl PartialEq<ShellOrExecExpr> for ShellOrExecExpr
sourcefn eq(&self, other: &ShellOrExecExpr) -> bool
fn eq(&self, other: &ShellOrExecExpr) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &ShellOrExecExpr) -> bool
fn ne(&self, other: &ShellOrExecExpr) -> bool
This method tests for !=.
impl Eq for ShellOrExecExpr
impl StructuralEq for ShellOrExecExpr
impl StructuralPartialEq for ShellOrExecExpr
Auto Trait Implementations
impl RefUnwindSafe for ShellOrExecExpr
impl Send for ShellOrExecExpr
impl Sync for ShellOrExecExpr
impl Unpin for ShellOrExecExpr
impl UnwindSafe for ShellOrExecExpr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more