pub struct ToolInvocationHead { /* private fields */ }Expand description
Compact exact identity of a validated invocation revision.
A head is an optimistic comparison token. It intentionally omits arguments,
results, and errors; obtain it from ToolInvocation::head or from storage
that has restored and verified the corresponding full record.
Implementations§
Source§impl ToolInvocationHead
impl ToolInvocationHead
Sourcepub fn new(
tenant_id: TenantId,
run_id: RunId,
invocation_id: InvocationId,
revision: ToolInvocationRevision,
status: ToolInvocationStatus,
attempt_id: Option<AttemptId>,
journal_head: JournalHead,
digest: Digest,
) -> Result<Self, ToolInvocationHeadError>
pub fn new( tenant_id: TenantId, run_id: RunId, invocation_id: InvocationId, revision: ToolInvocationRevision, status: ToolInvocationStatus, attempt_id: Option<AttemptId>, journal_head: JournalHead, digest: Digest, ) -> Result<Self, ToolInvocationHeadError>
Constructs a trusted compact head while enforcing scope and state shape.
§Errors
Returns ToolInvocationHeadError for crossed journal scope or an
impossible status/attempt 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) -> ToolInvocationRevision
pub const fn revision(&self) -> ToolInvocationRevision
Returns the exact record revision.
Sourcepub const fn status(&self) -> ToolInvocationStatus
pub const fn status(&self) -> ToolInvocationStatus
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 ToolInvocationHead
impl Clone for ToolInvocationHead
Source§impl Debug for ToolInvocationHead
impl Debug for ToolInvocationHead
Source§impl<'de> Deserialize<'de> for ToolInvocationHead
impl<'de> Deserialize<'de> for ToolInvocationHead
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 ToolInvocationHead
Source§impl JsonSchema for ToolInvocationHead
impl JsonSchema for ToolInvocationHead
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 ToolInvocationHead
impl PartialEq for ToolInvocationHead
Source§impl Serialize for ToolInvocationHead
impl Serialize for ToolInvocationHead
impl StructuralPartialEq for ToolInvocationHead
Auto Trait Implementations§
impl Forget for ToolInvocationHead
impl Freeze for ToolInvocationHead
impl Move for ToolInvocationHead
impl RefUnwindSafe for ToolInvocationHead
impl Send for ToolInvocationHead
impl Sync for ToolInvocationHead
impl Unpin for ToolInvocationHead
impl UnsafeUnpin for ToolInvocationHead
impl UnwindSafe for ToolInvocationHead
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