pub enum JobParameterDefinition {
STRING(JobStringParameterDefinition),
INT(JobIntParameterDefinition),
FLOAT(JobFloatParameterDefinition),
PATH(JobPathParameterDefinition),
BOOL(JobBoolParameterDefinition),
RANGE_EXPR(JobRangeExprParameterDefinition),
LIST_STRING(JobListStringParameterDefinition),
LIST_PATH(JobListPathParameterDefinition),
LIST_INT(JobListIntParameterDefinition),
LIST_FLOAT(JobListFloatParameterDefinition),
LIST_BOOL(JobListBoolParameterDefinition),
LIST_LIST_INT(JobListListIntParameterDefinition),
}Expand description
§2 JobParameterDefinition — discriminated union on type field.
With the EXPR extension, type names are case-insensitive and additional
types are available (BOOL, RANGE_EXPR, LIST[*]).
Variants§
STRING(JobStringParameterDefinition)
INT(JobIntParameterDefinition)
FLOAT(JobFloatParameterDefinition)
PATH(JobPathParameterDefinition)
BOOL(JobBoolParameterDefinition)
RANGE_EXPR(JobRangeExprParameterDefinition)
LIST_STRING(JobListStringParameterDefinition)
LIST_PATH(JobListPathParameterDefinition)
LIST_INT(JobListIntParameterDefinition)
LIST_FLOAT(JobListFloatParameterDefinition)
LIST_BOOL(JobListBoolParameterDefinition)
LIST_LIST_INT(JobListListIntParameterDefinition)
Implementations§
Source§impl JobParameterDefinition
impl JobParameterDefinition
pub fn job_param_type(&self) -> JobParameterType
pub fn name(&self) -> &str
pub fn description(&self) -> Option<&str>
pub fn type_name(&self) -> &str
pub fn path_properties(&self) -> (Option<ObjectType>, Option<DataFlow>)
pub fn default_value(&self) -> Option<String>
pub fn min_value_i64(&self) -> Option<i64>
pub fn max_value_i64(&self) -> Option<i64>
pub fn allowed_values_i64(&self) -> Option<Vec<i64>>
pub fn allowed_values_f64(&self) -> Option<Vec<f64>>
pub fn allowed_values_strings(&self) -> Option<Vec<String>>
pub fn min_length(&self) -> Option<usize>
pub fn max_length(&self) -> Option<usize>
pub fn min_value_f64(&self) -> Option<f64>
pub fn max_value_f64(&self) -> Option<f64>
Sourcepub fn item_min_value_i64(&self) -> Option<i64>
pub fn item_min_value_i64(&self) -> Option<i64>
item.minValue for LIST[INT]; the item.item.minValue path for LIST[LIST[INT]] is separate.
Sourcepub fn item_max_value_i64(&self) -> Option<i64>
pub fn item_max_value_i64(&self) -> Option<i64>
item.maxValue for LIST[INT].
Sourcepub fn item_allowed_values_i64(&self) -> Option<Vec<i64>>
pub fn item_allowed_values_i64(&self) -> Option<Vec<i64>>
item.allowedValues for LIST[INT] as Vec<i64>.
Sourcepub fn item_min_value_f64(&self) -> Option<f64>
pub fn item_min_value_f64(&self) -> Option<f64>
item.minValue for LIST[FLOAT].
Sourcepub fn item_max_value_f64(&self) -> Option<f64>
pub fn item_max_value_f64(&self) -> Option<f64>
item.maxValue for LIST[FLOAT].
Sourcepub fn item_allowed_values_f64(&self) -> Option<Vec<f64>>
pub fn item_allowed_values_f64(&self) -> Option<Vec<f64>>
item.allowedValues for LIST[FLOAT] as Vec<f64>.
Sourcepub fn item_min_length(&self) -> Option<usize>
pub fn item_min_length(&self) -> Option<usize>
item.minLength for LIST[STRING]/LIST[PATH] (char count) or LIST[LIST[INT]] (inner list count).
Sourcepub fn item_max_length(&self) -> Option<usize>
pub fn item_max_length(&self) -> Option<usize>
item.maxLength for LIST[STRING]/LIST[PATH] (char count) or LIST[LIST[INT]] (inner list count).
Sourcepub fn item_allowed_values_strings(&self) -> Option<Vec<String>>
pub fn item_allowed_values_strings(&self) -> Option<Vec<String>>
item.allowedValues for LIST[STRING]/LIST[PATH] as Vec<String>.
Sourcepub fn item_item_min_value_i64(&self) -> Option<i64>
pub fn item_item_min_value_i64(&self) -> Option<i64>
item.item.minValue for LIST[LIST[INT]].
Sourcepub fn item_item_max_value_i64(&self) -> Option<i64>
pub fn item_item_max_value_i64(&self) -> Option<i64>
item.item.maxValue for LIST[LIST[INT]].
Sourcepub fn item_item_allowed_values_i64(&self) -> Option<Vec<i64>>
pub fn item_item_allowed_values_i64(&self) -> Option<Vec<i64>>
item.item.allowedValues for LIST[LIST[INT]] as Vec<i64>.
pub fn check_constraints(&self, value: &ExprValue) -> Result<(), String>
pub fn validate_definition( &self, limits: &EffectiveLimits, ) -> Result<(), Vec<String>>
Trait Implementations§
Source§impl Clone for JobParameterDefinition
impl Clone for JobParameterDefinition
Source§fn clone(&self) -> JobParameterDefinition
fn clone(&self) -> JobParameterDefinition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for JobParameterDefinition
impl Debug for JobParameterDefinition
Source§impl<'de> Deserialize<'de> for JobParameterDefinition
impl<'de> Deserialize<'de> for JobParameterDefinition
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Auto Trait Implementations§
impl Freeze for JobParameterDefinition
impl RefUnwindSafe for JobParameterDefinition
impl Send for JobParameterDefinition
impl Sync for JobParameterDefinition
impl Unpin for JobParameterDefinition
impl UnsafeUnpin for JobParameterDefinition
impl UnwindSafe for JobParameterDefinition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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