pub struct DefinitionIdentity { /* private fields */ }Expand description
Canonical restart-relevant identity persisted with every execution.
Implementations§
Source§impl DefinitionIdentity
impl DefinitionIdentity
Sourcepub fn legacy() -> Self
pub fn legacy() -> Self
Builds the identity durable rows written before manifests carried one.
The bytes are frozen: a durable row that predates manifest identity must keep resolving to exactly this value.
Sourcepub fn tasklet(
job_name: &JobName,
step_name: &StepName,
revision: DefinitionRevision,
component_revision: &ComponentRevision,
) -> Result<Self, DefinitionError>
pub fn tasklet( job_name: &JobName, step_name: &StepName, revision: DefinitionRevision, component_revision: &ComponentRevision, ) -> Result<Self, DefinitionError>
Builds the canonical identity for a one-step tasklet definition.
§Errors
Returns DefinitionError::ManifestEncoding if the bounded canonical
manifest cannot be encoded.
Sourcepub fn chunk(
job_name: &JobName,
step_name: &StepName,
chunk_size: ChunkSize,
revision: DefinitionRevision,
components: &ChunkComponentRevisions,
) -> Result<Self, DefinitionError>
pub fn chunk( job_name: &JobName, step_name: &StepName, chunk_size: ChunkSize, revision: DefinitionRevision, components: &ChunkComponentRevisions, ) -> Result<Self, DefinitionError>
Builds the canonical identity for a one-step chunk definition.
§Errors
Returns DefinitionError::ManifestEncoding if the bounded canonical
manifest cannot be encoded.
Sourcepub fn from_flow_manifest(
job_name: &JobName,
revision: DefinitionRevision,
canonical: &[u8],
) -> Result<Self, DefinitionError>
pub fn from_flow_manifest( job_name: &JobName, revision: DefinitionRevision, canonical: &[u8], ) -> Result<Self, DefinitionError>
Builds the canonical identity for a compiled flow graph.
The bytes must already be the canonical manifest the plan compiler normalized and encoded; this constructor validates, bounds, and hashes them. Taking bytes rather than a parsed document keeps the serializer out of this contract and makes the encoding the caller is responsible for explicit rather than implied.
§Errors
Returns DefinitionError::ManifestEncoding when the bytes exceed the
bounded encoding, are not a canonical JSON object, or do not declare a
supported flow manifest format.
Sourcepub const fn revision(&self) -> &DefinitionRevision
pub const fn revision(&self) -> &DefinitionRevision
Borrows the application-owned definition revision.
Sourcepub const fn job_name(&self) -> Option<&JobName>
pub const fn job_name(&self) -> Option<&JobName>
Borrows the job name bound into a framework-produced manifest.
Legacy direct repository calls use an internal compatibility manifest without a bound name.
Sourcepub const fn manifest_format(&self) -> u16
pub const fn manifest_format(&self) -> u16
Returns the canonical manifest format version.
Sourcepub const fn manifest_digest(&self) -> &[u8; 32]
pub const fn manifest_digest(&self) -> &[u8; 32]
Returns the framework-produced SHA-256 manifest digest.
Sourcepub fn canonical_manifest(&self) -> &[u8] ⓘ
pub fn canonical_manifest(&self) -> &[u8] ⓘ
Borrows the exact canonical manifest bytes that produced the digest.
The manifest records names, logical identifiers, revisions, schema versions, and bounded policy values. Parameters, contexts, item values, credentials, endpoints, and component-private state are never encoded into it, so operators may inspect and archive these bytes.
Trait Implementations§
Source§impl Clone for DefinitionIdentity
impl Clone for DefinitionIdentity
Source§fn clone(&self) -> DefinitionIdentity
fn clone(&self) -> DefinitionIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more