pub struct ModelInvocationHead { /* private fields */ }Expand description
Compact exact identity of a validated model invocation revision.
A head is an optimistic comparison token. It intentionally omits prompts,
response content, and failures; obtain it from ModelInvocation::head or
storage that restored and verified the corresponding full record.
Implementations§
Source§impl ModelInvocationHead
impl ModelInvocationHead
Sourcepub fn new(
tenant_id: TenantId,
run_id: RunId,
invocation_id: InvocationId,
revision: ModelInvocationRevision,
status: ModelInvocationStatus,
attempt_id: Option<AttemptId>,
journal_head: JournalHead,
digest: Digest,
) -> Result<Self, ModelInvocationHeadError>
pub fn new( tenant_id: TenantId, run_id: RunId, invocation_id: InvocationId, revision: ModelInvocationRevision, status: ModelInvocationStatus, attempt_id: Option<AttemptId>, journal_head: JournalHead, digest: Digest, ) -> Result<Self, ModelInvocationHeadError>
Constructs a trusted compact head while enforcing scope and state shape.
§Errors
Returns ModelInvocationHeadError for crossed journal scope or an
impossible status/attempt/revision combination.
Sourcepub const fn invocation_id(&self) -> InvocationId
pub const fn invocation_id(&self) -> InvocationId
Returns the stable logical invocation identity.
Sourcepub const fn revision(&self) -> ModelInvocationRevision
pub const fn revision(&self) -> ModelInvocationRevision
Returns the exact record revision.
Sourcepub const fn status(&self) -> ModelInvocationStatus
pub const fn status(&self) -> ModelInvocationStatus
Returns the lifecycle state at this revision.
Sourcepub const fn attempt_id(&self) -> Option<AttemptId>
pub const fn attempt_id(&self) -> Option<AttemptId>
Returns the physical attempt represented by this revision, if any.
Sourcepub const fn journal_head(&self) -> &JournalHead
pub const fn journal_head(&self) -> &JournalHead
Returns the exact journal prefix anchoring this revision.
Trait Implementations§
Source§impl Clone for ModelInvocationHead
impl Clone for ModelInvocationHead
Source§impl Debug for ModelInvocationHead
impl Debug for ModelInvocationHead
Source§impl<'de> Deserialize<'de> for ModelInvocationHead
impl<'de> Deserialize<'de> for ModelInvocationHead
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ModelInvocationHead
Source§impl JsonSchema for ModelInvocationHead
impl JsonSchema for ModelInvocationHead
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ModelInvocationHead
impl PartialEq for ModelInvocationHead
Source§impl Serialize for ModelInvocationHead
impl Serialize for ModelInvocationHead
impl StructuralPartialEq for ModelInvocationHead
Auto Trait Implementations§
impl Forget for ModelInvocationHead
impl Freeze for ModelInvocationHead
impl Move for ModelInvocationHead
impl RefUnwindSafe for ModelInvocationHead
impl Send for ModelInvocationHead
impl Sync for ModelInvocationHead
impl Unpin for ModelInvocationHead
impl UnsafeUnpin for ModelInvocationHead
impl UnwindSafe for ModelInvocationHead
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
Mutably borrows from an owned value. Read more