pub struct OperationResult { /* private fields */ }Expand description
Terminal result for one operation execution.
Implementations§
Source§impl OperationResult
impl OperationResult
Sourcepub fn new(
operation_id: OperationId,
operation: OperationName,
target: TargetRef,
status: OperationStatus,
execution: ExecutionMetadata,
) -> Result<Self, ResultError>
pub fn new( operation_id: OperationId, operation: OperationName, target: TargetRef, status: OperationStatus, execution: ExecutionMetadata, ) -> Result<Self, ResultError>
Creates a validated terminal result.
Sourcepub fn with_output(self, output: Value) -> Result<Self, ResultError>
pub fn with_output(self, output: Value) -> Result<Self, ResultError>
Adds bounded structured output.
Sourcepub fn with_artifact(self, artifact: ArtifactRef) -> Self
pub fn with_artifact(self, artifact: ArtifactRef) -> Self
Adds an artifact reference.
Sourcepub fn with_diagnostic(self, diagnostic: Diagnostic) -> Self
pub fn with_diagnostic(self, diagnostic: Diagnostic) -> Self
Adds a structured diagnostic.
Sourcepub fn with_evidence(self, evidence: EvidenceRef) -> Self
pub fn with_evidence(self, evidence: EvidenceRef) -> Self
Adds captured evidence.
Sourcepub fn with_verification(
self,
verification: VerificationResult,
) -> Result<Self, ResultError>
pub fn with_verification( self, verification: VerificationResult, ) -> Result<Self, ResultError>
Adds an independent verification result.
Sourcepub fn with_redaction(self, redaction: RedactionMetadata) -> Self
pub fn with_redaction(self, redaction: RedactionMetadata) -> Self
Adds redaction metadata.
Sourcepub fn validate(&self) -> Result<(), ResultError>
pub fn validate(&self) -> Result<(), ResultError>
Validates terminal-status diagnostics and verification invariants.
Sourcepub fn operation_id(&self) -> &OperationId
pub fn operation_id(&self) -> &OperationId
Returns the operation identity.
Sourcepub fn operation(&self) -> &OperationName
pub fn operation(&self) -> &OperationName
Returns the canonical operation name.
Sourcepub const fn status(&self) -> OperationStatus
pub const fn status(&self) -> OperationStatus
Returns execution status.
Sourcepub const fn mutation_send_state(&self) -> MutationSendState
pub const fn mutation_send_state(&self) -> MutationSendState
Returns mutation-send state.
Sourcepub const fn retry(&self) -> RetryClass
pub const fn retry(&self) -> RetryClass
Returns retry classification.
Sourcepub fn artifacts(&self) -> &[ArtifactRef]
pub fn artifacts(&self) -> &[ArtifactRef]
Returns artifact references.
Sourcepub fn diagnostics(&self) -> &[Diagnostic]
pub fn diagnostics(&self) -> &[Diagnostic]
Returns diagnostics.
Sourcepub fn evidence(&self) -> &[EvidenceRef]
pub fn evidence(&self) -> &[EvidenceRef]
Returns captured evidence references.
Sourcepub fn verification(&self) -> Option<&VerificationResult>
pub fn verification(&self) -> Option<&VerificationResult>
Returns verification when performed.
Sourcepub fn redaction(&self) -> &RedactionMetadata
pub fn redaction(&self) -> &RedactionMetadata
Returns redaction metadata.
Trait Implementations§
Source§impl Clone for OperationResult
impl Clone for OperationResult
Source§fn clone(&self) -> OperationResult
fn clone(&self) -> OperationResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OperationResult
impl Debug for OperationResult
Source§impl<'de> Deserialize<'de> for OperationResult
impl<'de> Deserialize<'de> for OperationResult
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
Source§impl JsonSchema for OperationResult
impl JsonSchema for OperationResult
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 OperationResult
impl PartialEq for OperationResult
Source§fn eq(&self, other: &OperationResult) -> bool
fn eq(&self, other: &OperationResult) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for OperationResult
impl Serialize for OperationResult
impl StructuralPartialEq for OperationResult
Auto Trait Implementations§
impl Freeze for OperationResult
impl RefUnwindSafe for OperationResult
impl Send for OperationResult
impl Sync for OperationResult
impl Unpin for OperationResult
impl UnsafeUnpin for OperationResult
impl UnwindSafe for OperationResult
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