pub struct JobInstanceKey { /* private fields */ }Expand description
The canonical identity key for a logical job instance.
Parameter entries are ordered by validated name, retain their value type,
and include only parameters marked ParameterRole::Identifying.
Implementations§
Source§impl JobInstanceKey
impl JobInstanceKey
Sourcepub fn new(job_name: JobName, parameters: &JobParameters) -> Self
pub fn new(job_name: JobName, parameters: &JobParameters) -> Self
Constructs the canonical key for a named job and parameter set.
Sourcepub fn identifying_parameter_count(&self) -> usize
pub fn identifying_parameter_count(&self) -> usize
Returns the number of identifying parameters.
Sourcepub fn identifying_value(&self, name: &ParameterName) -> Option<&ParameterValue>
pub fn identifying_value(&self, name: &ParameterName) -> Option<&ParameterValue>
Returns an identifying value for authorized application or persistence use.
Sourcepub fn identifying_fields(
&self,
) -> impl ExactSizeIterator<Item = (&ParameterName, ParameterValueKind)>
pub fn identifying_fields( &self, ) -> impl ExactSizeIterator<Item = (&ParameterName, ParameterValueKind)>
Iterates over identifying parameter names and value kinds in canonical order without exposing their values.
Sourcepub fn digest(&self) -> [u8; 32]
pub fn digest(&self) -> [u8; 32]
Returns the canonical 32-byte digest of this identifying key.
The encoding is version tagged, length prefixed, and type tagged, so two keys collide only when their job name and identifying parameters are equal. Durable adapters, operator request digests, and redacted projections share it, and no parameter value is recoverable from the result. The version-1 byte layout is durable data and never changes.
Trait Implementations§
Source§impl Clone for JobInstanceKey
impl Clone for JobInstanceKey
Source§fn clone(&self) -> JobInstanceKey
fn clone(&self) -> JobInstanceKey
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more