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§
Source§impl 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§
Source§impl Clone for ShellOrExecExpr
impl Clone for ShellOrExecExpr
Source§fn clone(&self) -> ShellOrExecExpr
fn clone(&self) -> ShellOrExecExpr
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 ShellOrExecExpr
impl Debug for ShellOrExecExpr
Source§impl PartialEq for ShellOrExecExpr
impl PartialEq for ShellOrExecExpr
impl Eq for ShellOrExecExpr
impl StructuralPartialEq for ShellOrExecExpr
Auto Trait Implementations§
impl Freeze for ShellOrExecExpr
impl RefUnwindSafe for ShellOrExecExpr
impl Send for ShellOrExecExpr
impl Sync for ShellOrExecExpr
impl Unpin for ShellOrExecExpr
impl UnwindSafe for ShellOrExecExpr
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