Skip to main content

DefinitionIdentity

Struct DefinitionIdentity 

Source
pub struct DefinitionIdentity { /* private fields */ }
Expand description

Canonical restart-relevant identity persisted with every execution.

Implementations§

Source§

impl DefinitionIdentity

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub const fn revision(&self) -> &DefinitionRevision

Borrows the application-owned definition revision.

Source

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.

Source

pub const fn manifest_format(&self) -> u16

Returns the canonical manifest format version.

Source

pub const fn manifest_digest(&self) -> &[u8; 32]

Returns the framework-produced SHA-256 manifest digest.

Source

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

Source§

fn clone(&self) -> DefinitionIdentity

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 DefinitionIdentity

Source§

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

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

impl Eq for DefinitionIdentity

Source§

impl PartialEq for DefinitionIdentity

Source§

fn eq(&self, other: &DefinitionIdentity) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DefinitionIdentity

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> Same for T

Source§

type Output = T

Should always be Self
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.