Struct cli::types::TaskCondition
source · pub struct TaskCondition {Show 16 fields
pub condition_type: Option<ConditionType>,
pub fail_message: Option<String>,
pub profiles: Option<Vec<String>>,
pub os: Option<Vec<String>>,
pub platforms: Option<Vec<String>>,
pub channels: Option<Vec<String>>,
pub env_set: Option<Vec<String>>,
pub env_not_set: Option<Vec<String>>,
pub env: Option<IndexMap<String, String>>,
pub env_true: Option<Vec<String>>,
pub env_false: Option<Vec<String>>,
pub env_contains: Option<IndexMap<String, String>>,
pub rust_version: Option<RustVersionCondition>,
pub files_exist: Option<Vec<String>>,
pub files_not_exist: Option<Vec<String>>,
pub files_modified: Option<FilesFilesModifiedCondition>,
}
Expand description
Holds condition attributes
Fields§
§condition_type: Option<ConditionType>
condition type (AND/OR) by default AND
fail_message: Option<String>
Failure message
profiles: Option<Vec<String>>
Profile names (development, …)
os: Option<Vec<String>>
As defined in the cfg target_os
platforms: Option<Vec<String>>
Platform names (linux, windows, mac)
channels: Option<Vec<String>>
Channel names (stable, beta, nightly)
env_set: Option<Vec<String>>
Environment variables which must be defined
env_not_set: Option<Vec<String>>
Environment variables which must not be defined
env: Option<IndexMap<String, String>>
Environment variables and their values
env_true: Option<Vec<String>>
Environment variables which are defined as true
env_false: Option<Vec<String>>
Environment variables which are defined as false
env_contains: Option<IndexMap<String, String>>
Environment variables and the values which they are required to contain
rust_version: Option<RustVersionCondition>
Rust version condition
files_exist: Option<Vec<String>>
Files exist
files_not_exist: Option<Vec<String>>
Files which do not exist
files_modified: Option<FilesFilesModifiedCondition>
Files modified since last execution
Implementations§
source§impl TaskCondition
impl TaskCondition
pub fn get_condition_type(&self) -> ConditionType
Trait Implementations§
source§impl Clone for TaskCondition
impl Clone for TaskCondition
source§fn clone(&self) -> TaskCondition
fn clone(&self) -> TaskCondition
Returns a copy 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 moresource§impl Debug for TaskCondition
impl Debug for TaskCondition
source§impl Default for TaskCondition
impl Default for TaskCondition
source§fn default() -> TaskCondition
fn default() -> TaskCondition
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for TaskCondition
impl<'de> Deserialize<'de> for TaskCondition
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 TaskCondition
impl RefUnwindSafe for TaskCondition
impl Send for TaskCondition
impl Sync for TaskCondition
impl Unpin for TaskCondition
impl UnwindSafe for TaskCondition
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more