pub enum RedirectOrEnvVar<R, V, W> {
Redirect(R),
EnvVar(V, Option<W>),
}
Expand description
Represents a parsed redirect or a defined environment variable at the start of a command.
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 before a command was encountered.
EnvVar(V, Option<W>)
A parsed environment variable, e.g. foo=[bar]
.
Trait Implementations§
Source§impl<R: Clone, V: Clone, W: Clone> Clone for RedirectOrEnvVar<R, V, W>
impl<R: Clone, V: Clone, W: Clone> Clone for RedirectOrEnvVar<R, V, W>
Source§fn clone(&self) -> RedirectOrEnvVar<R, V, W>
fn clone(&self) -> RedirectOrEnvVar<R, V, 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, V: Eq, W: Eq> Eq for RedirectOrEnvVar<R, V, W>
impl<R, V, W> StructuralPartialEq for RedirectOrEnvVar<R, V, W>
Auto Trait Implementations§
impl<R, V, W> Freeze for RedirectOrEnvVar<R, V, W>
impl<R, V, W> RefUnwindSafe for RedirectOrEnvVar<R, V, W>
impl<R, V, W> Send for RedirectOrEnvVar<R, V, W>
impl<R, V, W> Sync for RedirectOrEnvVar<R, V, W>
impl<R, V, W> Unpin for RedirectOrEnvVar<R, V, W>
impl<R, V, W> UnwindSafe for RedirectOrEnvVar<R, V, W>
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