pub enum TestExpr {
Show 18 variants
StringEq(BashExpr, BashExpr),
StringNe(BashExpr, BashExpr),
IntEq(BashExpr, BashExpr),
IntNe(BashExpr, BashExpr),
IntLt(BashExpr, BashExpr),
IntLe(BashExpr, BashExpr),
IntGt(BashExpr, BashExpr),
IntGe(BashExpr, BashExpr),
FileExists(BashExpr),
FileReadable(BashExpr),
FileWritable(BashExpr),
FileExecutable(BashExpr),
FileDirectory(BashExpr),
StringEmpty(BashExpr),
StringNonEmpty(BashExpr),
And(Box<TestExpr>, Box<TestExpr>),
Or(Box<TestExpr>, Box<TestExpr>),
Not(Box<TestExpr>),
}Expand description
Test expression (conditional)
Variants§
StringEq(BashExpr, BashExpr)
String comparison
StringNe(BashExpr, BashExpr)
IntEq(BashExpr, BashExpr)
Integer comparison
IntNe(BashExpr, BashExpr)
IntLt(BashExpr, BashExpr)
IntLe(BashExpr, BashExpr)
IntGt(BashExpr, BashExpr)
IntGe(BashExpr, BashExpr)
FileExists(BashExpr)
File tests
FileReadable(BashExpr)
FileWritable(BashExpr)
FileExecutable(BashExpr)
FileDirectory(BashExpr)
StringEmpty(BashExpr)
String tests
StringNonEmpty(BashExpr)
And(Box<TestExpr>, Box<TestExpr>)
Logical operations
Or(Box<TestExpr>, Box<TestExpr>)
Not(Box<TestExpr>)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TestExpr
impl<'de> Deserialize<'de> for TestExpr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TestExpr
impl StructuralPartialEq for TestExpr
Auto Trait Implementations§
impl Freeze for TestExpr
impl RefUnwindSafe for TestExpr
impl Send for TestExpr
impl Sync for TestExpr
impl Unpin for TestExpr
impl UnwindSafe for TestExpr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.