Skip to main content

JobParameterDefinition

Enum JobParameterDefinition 

Source
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

Source

pub fn job_param_type(&self) -> JobParameterType

Source

pub fn name(&self) -> &str

Source

pub fn description(&self) -> Option<&str>

Source

pub fn type_name(&self) -> &str

Source

pub fn path_properties(&self) -> (Option<ObjectType>, Option<DataFlow>)

Source

pub fn default_value(&self) -> Option<String>

Source

pub fn min_value_i64(&self) -> Option<i64>

Source

pub fn max_value_i64(&self) -> Option<i64>

Source

pub fn allowed_values_i64(&self) -> Option<Vec<i64>>

Source

pub fn allowed_values_f64(&self) -> Option<Vec<f64>>

Source

pub fn allowed_values_strings(&self) -> Option<Vec<String>>

Source

pub fn min_length(&self) -> Option<usize>

Source

pub fn max_length(&self) -> Option<usize>

Source

pub fn min_value_f64(&self) -> Option<f64>

Source

pub fn max_value_f64(&self) -> Option<f64>

Source

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.

Source

pub fn item_max_value_i64(&self) -> Option<i64>

item.maxValue for LIST[INT].

Source

pub fn item_allowed_values_i64(&self) -> Option<Vec<i64>>

item.allowedValues for LIST[INT] as Vec<i64>.

Source

pub fn item_min_value_f64(&self) -> Option<f64>

item.minValue for LIST[FLOAT].

Source

pub fn item_max_value_f64(&self) -> Option<f64>

item.maxValue for LIST[FLOAT].

Source

pub fn item_allowed_values_f64(&self) -> Option<Vec<f64>>

item.allowedValues for LIST[FLOAT] as Vec<f64>.

Source

pub fn item_min_length(&self) -> Option<usize>

item.minLength for LIST[STRING]/LIST[PATH] (char count) or LIST[LIST[INT]] (inner list count).

Source

pub fn item_max_length(&self) -> Option<usize>

item.maxLength for LIST[STRING]/LIST[PATH] (char count) or LIST[LIST[INT]] (inner list count).

Source

pub fn item_allowed_values_strings(&self) -> Option<Vec<String>>

item.allowedValues for LIST[STRING]/LIST[PATH] as Vec<String>.

Source

pub fn item_item_min_value_i64(&self) -> Option<i64>

item.item.minValue for LIST[LIST[INT]].

Source

pub fn item_item_max_value_i64(&self) -> Option<i64>

item.item.maxValue for LIST[LIST[INT]].

Source

pub fn item_item_allowed_values_i64(&self) -> Option<Vec<i64>>

item.item.allowedValues for LIST[LIST[INT]] as Vec<i64>.

Source

pub fn check_constraints(&self, value: &ExprValue) -> Result<(), String>

Source

pub fn validate_definition( &self, limits: &EffectiveLimits, ) -> Result<(), Vec<String>>

Trait Implementations§

Source§

impl Clone for JobParameterDefinition

Source§

fn clone(&self) -> JobParameterDefinition

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for JobParameterDefinition

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for JobParameterDefinition

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,