pub struct JobTemplate {
pub specification_version: String,
pub schema: Option<String>,
pub extensions: Option<Vec<ExtensionName>>,
pub name: FormatString,
pub description: Option<Description>,
pub parameter_definitions: Option<Vec<JobParameterDefinition>>,
pub job_environments: Option<Vec<Environment>>,
pub steps: Vec<StepTemplate>,
}Expand description
§1.1 JobTemplate
Fields§
§specification_version: String§schema: Option<String>§extensions: Option<Vec<ExtensionName>>§name: FormatString§description: Option<Description>§parameter_definitions: Option<Vec<JobParameterDefinition>>§job_environments: Option<Vec<Environment>>§steps: Vec<StepTemplate>Implementations§
Source§impl JobTemplate
impl JobTemplate
pub fn name(&self) -> &FormatString
pub fn description(&self) -> Option<&str>
pub fn parameter_definitions_list(&self) -> &[JobParameterDefinition]
Sourcepub fn profile(&self) -> ModelProfile
pub fn profile(&self) -> ModelProfile
Derive the ModelProfile described by
this template: the revision from specificationVersion and the
extensions set declared on the template.
Entries in the extensions list that don’t parse as a known
ModelExtension are silently
skipped.
This is the “what the template says it needs” profile — the one
to pass to sessions, to
ModelProfile::to_expr_profile,
or to wrap in a
ValidationContext when
calling create_job.
Sourcepub fn default_validation_context(&self) -> ValidationContext
pub fn default_validation_context(&self) -> ValidationContext
Convenience: wrap profile in a
ValidationContext with
default caller limits. Equivalent to
ValidationContext::from_profile(self.profile()).
This is the convenient “do what the template says” context for
callers that do not want to override revision/extension policy.
Callers that do want to override (e.g. a service stripping EXPR
regardless of template intent) should build a
ValidationContext explicitly and use
with_caller_limits
as needed.
Trait Implementations§
Source§impl Clone for JobTemplate
impl Clone for JobTemplate
Source§fn clone(&self) -> JobTemplate
fn clone(&self) -> JobTemplate
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 JobTemplate
impl Debug for JobTemplate
Source§impl<'de> Deserialize<'de> for JobTemplate
impl<'de> Deserialize<'de> for JobTemplate
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>,
Auto Trait Implementations§
impl Freeze for JobTemplate
impl RefUnwindSafe for JobTemplate
impl Send for JobTemplate
impl Sync for JobTemplate
impl Unpin for JobTemplate
impl UnsafeUnpin for JobTemplate
impl UnwindSafe for JobTemplate
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