pub enum RedirectOrCmdWord<R, W> {
Redirect(R),
CmdWord(W),
}
Expand description
Represents a parsed redirect or a defined command or command argument.
Because the order in which redirects are defined may be significant for execution, the parser will preserve the order in which they were parsed. Thus we need a wrapper like this to disambiguate what was encountered in the source program.
Variants§
Redirect(R)
A parsed redirect after a command was encountered.
CmdWord(W)
A parsed command name or argument.
Trait Implementations§
Source§impl<R: Clone, W: Clone> Clone for RedirectOrCmdWord<R, W>
impl<R: Clone, W: Clone> Clone for RedirectOrCmdWord<R, W>
Source§fn clone(&self) -> RedirectOrCmdWord<R, W>
fn clone(&self) -> RedirectOrCmdWord<R, W>
Returns a duplicate 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 moreimpl<R: Eq, W: Eq> Eq for RedirectOrCmdWord<R, W>
impl<R, W> StructuralPartialEq for RedirectOrCmdWord<R, W>
Auto Trait Implementations§
impl<R, W> Freeze for RedirectOrCmdWord<R, W>
impl<R, W> RefUnwindSafe for RedirectOrCmdWord<R, W>where
R: RefUnwindSafe,
W: RefUnwindSafe,
impl<R, W> Send for RedirectOrCmdWord<R, W>
impl<R, W> Sync for RedirectOrCmdWord<R, W>
impl<R, W> Unpin for RedirectOrCmdWord<R, W>
impl<R, W> UnwindSafe for RedirectOrCmdWord<R, W>where
R: UnwindSafe,
W: UnwindSafe,
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