pub enum Rhs<'a> {
Unbound,
Literal {
val: &'a str,
},
Variable {
name: &'a str,
},
ShorthandVariable,
GraftedVariable {
name: Ident<'a>,
branch: Branch<'a>,
},
TaskOutput {
task: &'a str,
output: &'a str,
},
ShorthandTaskOutput {
task: &'a str,
},
GraftedTaskOutput {
task: &'a str,
output: &'a str,
branch: Vec<(&'a str, &'a str)>,
},
ShorthandGraftedTaskOutput {
task: &'a str,
branch: Vec<(&'a str, &'a str)>,
},
Branchpoint {
branchpoint: &'a str,
vals: Vec<(&'a str, Self)>,
},
Interp {
text: &'a str,
vars: Vec<&'a str>,
},
}
Expand description
The right-hand side of any value expression. Ducttape originally had another rhs type: Sequential branchpoint expressions, written (Branchpoint: 0..10..1).
Variants§
Unbound
no rhs (e.g. in output specs)
Literal
“some quoted value” or unquoted_value_without_spaces
Variable
$var
ShorthandVariable
@
GraftedVariable
$var[Branchpoint: val]
TaskOutput
$var@task
ShorthandTaskOutput
@task
GraftedTaskOutput
$var@task[Branchpoint: val]
ShorthandGraftedTaskOutput
@task[Branchpoint: val]
Branchpoint
(Branchpoint: val1=$rhs1 val2=$rhs2)
Interp
“foo-$bla-blee” or just ‘foo’
Trait Implementations§
impl<'a> Eq for Rhs<'a>
impl<'a> StructuralPartialEq for Rhs<'a>
Auto Trait Implementations§
impl<'a> Freeze for Rhs<'a>
impl<'a> RefUnwindSafe for Rhs<'a>
impl<'a> Send for Rhs<'a>
impl<'a> Sync for Rhs<'a>
impl<'a> Unpin for Rhs<'a>
impl<'a> UnwindSafe for Rhs<'a>
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