pub struct RunFailure { /* private fields */ }Expand description
Non-cancellation terminal failure with complete cumulative usage.
Implementations§
Source§impl RunFailure
impl RunFailure
Sourcepub fn new(
failure: Failure,
completed_at: Timestamp,
usage: BudgetUsage,
) -> Result<Self, RunFailureError>
pub fn new( failure: Failure, completed_at: Timestamp, usage: BudgetUsage, ) -> Result<Self, RunFailureError>
Constructs a non-cancellation terminal failure.
§Errors
Returns RunFailureError::CancellationRequiresCancellationPath when
a cancellation-category failure tries to bypass the two-phase path.
Sourcepub const fn completed_at(&self) -> Timestamp
pub const fn completed_at(&self) -> Timestamp
Returns the durable clock observation at terminal commit.
Sourcepub const fn usage(&self) -> &BudgetUsage
pub const fn usage(&self) -> &BudgetUsage
Returns complete cumulative usage at terminal commit.
Sourcepub fn into_parts(self) -> (Failure, Timestamp, BudgetUsage)
pub fn into_parts(self) -> (Failure, Timestamp, BudgetUsage)
Consumes the terminal record into its durable components.
Trait Implementations§
Source§impl Clone for RunFailure
impl Clone for RunFailure
Source§impl Debug for RunFailure
impl Debug for RunFailure
Source§impl<'de> Deserialize<'de> for RunFailure
impl<'de> Deserialize<'de> for RunFailure
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 RunFailure
impl JsonSchema for RunFailure
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for RunFailure
impl !UnwindSafe for RunFailure
impl Forget for RunFailure
impl Freeze for RunFailure
impl Move for RunFailure
impl Send for RunFailure
impl Sync for RunFailure
impl Unpin for RunFailure
impl UnsafeUnpin for RunFailure
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