pub struct When {
pub equal: Option<WhenComparison>,
pub not_equal: Option<WhenComparison>,
pub command: Option<String>,
pub exists: Option<String>,
pub env_set: Option<String>,
pub env_not_set: Option<String>,
pub option_set: Option<String>,
pub option_not_set: Option<String>,
}Expand description
A conditional expression
Fields§
§equal: Option<WhenComparison>Check if values are equal
not_equal: Option<WhenComparison>Check if values are not equal
command: Option<String>Check if a command succeeds
exists: Option<String>Check if a path exists
env_set: Option<String>Check if environment variable is set
env_not_set: Option<String>Check if environment variable is not set
option_set: Option<String>Check if option is set
option_not_set: Option<String>Check if option is not set
Trait Implementations§
Source§impl<'de> Deserialize<'de> for When
impl<'de> Deserialize<'de> for When
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
Auto Trait Implementations§
impl Freeze for When
impl RefUnwindSafe for When
impl Send for When
impl Sync for When
impl Unpin for When
impl UnwindSafe for When
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