Skip to main content

CdtError

Enum CdtError 

Source
#[non_exhaustive]
pub enum CdtError {
Show 32 variants UnsupportedDimension(u32), DelaunayGenerationFailed { vertex_count: u32, coordinate_range: (f64, f64), attempt: u32, underlying_error: String, }, DelaunayValidationFailed { level: DelaunayValidationLevel, detail: String, }, InvalidGenerationParameters { issue: GenerationParameterIssue, provided_value: String, expected_range: String, }, InvalidConfiguration { setting: ConfigurationSetting, provided_value: String, expected: String, }, InvalidSimulationConfiguration { setting: ConfigurationSetting, provided_value: String, expected: String, }, InvalidSimplexCount { field: SimplexCountField, provided_value: usize, }, InvalidMeasurementCount { field: MeasurementCountField, provided_value: u32, }, InvalidMeasurementVolumeProfile { step: u32, profile_total: u64, triangles: u32, }, InvalidScalarTraceCount { field: MeasurementCountField, provided_value: u32, }, MeasurementCountOverflow { field: MeasurementCountField, provided_value: usize, max: u32, }, InvalidMeasurementAction { step: u32, provided_value: f64, }, MetropolisMoveApplicationFailed { step: u32, move_type: MoveType, attempts: usize, source: MetropolisMoveApplicationFailure, }, ProposalApplicationFailed { move_type: MoveType, attempt: usize, source: MetropolisMoveApplicationFailure, }, PlannedProposalTelemetryMissing { step: u32, }, PlannedProposalStepFailed { step: u32, detail: String, }, UnexpectedPlannedStepOutcome { step: u32, outcome: StepOutcome, }, InvalidTriangulationMetadata { field: TriangulationMetadataField, topology: CdtTopology, provided_value: String, expected: String, }, ValidationFailed { check: CdtValidationCheck, failure: CdtValidationFailure, }, TopologyMismatch { topology: CdtTopology, euler_characteristic: i128, expected_euler_characteristics: Vec<i128>, vertices: usize, edges: usize, faces: usize, }, Foliation(FoliationError), VertexBuildFailed { context: String, underlying_error: String, }, BackendMutationFailed { operation: BackendMutationOperation, target: String, detail: String, }, BackendRollbackFailed { operation: BackendMutationOperation, target: String, detail: String, rollback_errors: String, }, CausalityViolation { time_0: u32, time_1: u32, step_distance: u32, }, Mcmc(McmcError), OutputWriteFailed { path: String, format: OutputFormat, detail: String, }, OutputPathResolutionFailed { base_path: String, detail: String, }, OutputPathConflict { csv_path: String, json_path: String, }, OutputReadFailed { path: String, format: OutputFormat, detail: String, }, CheckpointSerializationFailed { operation: CheckpointOperation, target: String, detail: String, }, CheckpointResumeFailed { failure: CheckpointResumeFailure, },
}
Expand description

Main error type for CDT operations.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

UnsupportedDimension(u32)

Invalid dimension specified

§

DelaunayGenerationFailed

Delaunay triangulation generation failed with detailed context

Fields

§vertex_count: u32

Number of vertices requested for the triangulation

§coordinate_range: (f64, f64)

Coordinate range used for generation

§attempt: u32

Attempt number when the failure occurred

§underlying_error: String

Description of the underlying error that caused the failure

§

DelaunayValidationFailed

Upstream Delaunay validation rejected a geometry backend.

Fields

§level: DelaunayValidationLevel

Cumulative upstream validation level being enforced.

§detail: String

Upstream validation diagnostic.

§

InvalidGenerationParameters

Invalid generation parameters detected before attempting triangulation

Fields

§issue: GenerationParameterIssue

Structured category for the rejected generation parameter.

§provided_value: String

The actual value that was provided

§expected_range: String

The expected range or constraint for the parameter

§

InvalidConfiguration

Top-level CDT configuration failed validation.

Fields

§setting: ConfigurationSetting

Structured category for the invalid configuration setting.

§provided_value: String

Value supplied for the setting.

§expected: String

Expected constraint for the setting.

§

InvalidSimulationConfiguration

Metropolis / simulation configuration failed validation.

Fields

§setting: ConfigurationSetting

Structured category for the invalid simulation setting.

§provided_value: String

Value supplied for the setting.

§expected: String

Expected constraint for the setting.

§

InvalidSimplexCount

Live CDT simplex counts failed the strictly-positive triangulation-state invariant.

Fields

§field: SimplexCountField

Structured category for the invalid simplex count.

§provided_value: usize

Value observed for the count.

§

InvalidMeasurementCount

Measurement construction failed because a count was not strictly positive.

Fields

§field: MeasurementCountField

Structured category for the invalid measurement count.

§provided_value: u32

Value supplied for the count.

§

InvalidMeasurementVolumeProfile

Measurement construction failed because a per-slice volume profile could not fit the stored triangle count.

Fields

§step: u32

Measurement step with invalid volume-profile telemetry.

§profile_total: u64

Sum of the supplied volume profile entries.

§triangles: u32

Stored measurement triangle count.

§

InvalidScalarTraceCount

Scalar trace row construction failed because a count was not strictly positive.

Fields

§field: MeasurementCountField

Structured category for the invalid scalar trace count.

§provided_value: u32

Value supplied for the count.

§

MeasurementCountOverflow

Measurement construction failed because a live triangulation count could not fit the serialized count type.

Fields

§field: MeasurementCountField

Structured category for the overflowing measurement count.

§provided_value: usize

Value supplied for the count.

§max: u32

Maximum representable count for serialized telemetry.

§

InvalidMeasurementAction

Measurement construction failed because the action value was not finite.

Fields

§step: u32

Monte Carlo step associated with the measurement.

§provided_value: f64

Value supplied for the action.

§

MetropolisMoveApplicationFailed

Metropolis accepted a move, but a hard backend or invariant failure stopped application.

The Self::MetropolisMoveApplicationFailed::source field keeps the lower-level failure category as MetropolisMoveApplicationFailure so callers can distinguish backend mutation, validation, topology, foliation, and causality failures without parsing the rendered message.

Fields

§step: u32

Monte Carlo step whose accepted move could not be applied.

§move_type: MoveType

Accepted move type being applied.

§attempts: usize

Number of application attempts made before failing.

§source: MetropolisMoveApplicationFailure

Most specific lower-level rejection or failure observed.

§

ProposalApplicationFailed

Planning or committing a standalone planned CDT proposal hit a hard failure.

Fields

§move_type: MoveType

Move type whose concrete proposal application failed.

§attempt: usize

Local-site attempt that hit the hard failure.

§source: MetropolisMoveApplicationFailure

Most specific lower-level rejection or failure observed.

§

PlannedProposalTelemetryMissing

A planned CDT proposal step completed without required proposal telemetry.

Fields

§step: u32

Monte Carlo step that was missing metadata or accepted-step action evidence.

§

PlannedProposalStepFailed

A planned CDT proposal step failed in a way CDT cannot classify yet.

Fields

§step: u32

Monte Carlo step whose planned-proposal execution failed.

§detail: String

Upstream sampler diagnostic.

§

UnexpectedPlannedStepOutcome

A planned CDT proposal step returned an upstream outcome CDT does not support yet.

Fields

§step: u32

Monte Carlo step whose planned-proposal execution produced the outcome.

§outcome: StepOutcome

Upstream outcome variant that CDT does not support yet.

§

InvalidTriangulationMetadata

Constructed triangulation metadata is internally inconsistent.

Fields

§field: TriangulationMetadataField

Structured category for the invalid metadata field.

§topology: CdtTopology

Topology whose invariant was violated.

§provided_value: String

Value stored in the triangulation metadata.

§expected: String

Expected constraint for the metadata field.

§

ValidationFailed

Validation of a constructed triangulation failed.

The Self::ValidationFailed::check field identifies the broad validation phase, while Self::ValidationFailed::failure carries the typed invariant failure within that phase.

Fields

§check: CdtValidationCheck

Validation check that failed.

§failure: CdtValidationFailure

Structured validation failure detail.

§

TopologyMismatch

Topology metadata does not match the backend Euler characteristic.

Fields

§topology: CdtTopology

Topology requested by CDT metadata.

§euler_characteristic: i128

Observed Euler characteristic from the backend.

§expected_euler_characteristics: Vec<i128>

Accepted Euler characteristics for the requested topology.

§vertices: usize

Backend vertex count at validation time.

§edges: usize

Backend edge count at validation time.

§faces: usize

Backend face count at validation time.

§

Foliation(FoliationError)

Foliation construction or validation failed with a typed foliation error.

§

VertexBuildFailed

Vertex construction failed during triangulation generation

Fields

§context: String

Human-readable context (e.g., function name or vertex index)

§underlying_error: String

The underlying builder error message

§

BackendMutationFailed

Backend payload mutation failed due to an invalid or unavailable handle.

Fields

§operation: BackendMutationOperation

Mutation operation being attempted.

§target: String

Human-readable target handle (e.g., “vertex VertexKey(..)”).

§detail: String

Additional failure detail.

§

BackendRollbackFailed

Backend mutation failed and restoring previously staged payloads also failed.

Fields

§operation: BackendMutationOperation

Mutation operation being attempted when the first failure occurred.

§target: String

Human-readable target handle for the first failure.

§detail: String

Primary mutation failure detail.

§rollback_errors: String

Rollback failure details for one or more payloads.

§

CausalityViolation

An edge violates the causal structure by spanning more than one time slice (or, on toroidal topology, more than one circular slice step).

Fields

§time_0: u32

Time label of the first endpoint.

§time_1: u32

Time label of the second endpoint.

§step_distance: u32

Topology-aware temporal step distance between the two labels.

On OpenBoundary topology this equals time_0.abs_diff(time_1). On Toroidal topology it is the circular distance min(d, T − d), so the wrap-around edge between slice T − 1 and slice 0 reads as 1 rather than T − 1. This is the quantity that triggers the violation (step_distance > 1).

§

Mcmc(McmcError)

Upstream MCMC framework error, such as a non-finite log-probability.

§

OutputWriteFailed

Writing CSV/JSON simulation output failed.

Fields

§path: String

Target output path.

§format: OutputFormat

Output format being written.

§detail: String

Lower-level I/O or serialization error.

§

OutputPathResolutionFailed

Resolving a configured output path failed before writing began.

Fields

§base_path: String

Base path used for resolving configured output paths.

§detail: String

Lower-level path resolution error.

§

OutputPathConflict

Configured CSV and JSON output paths resolve to the same file.

Fields

§csv_path: String

Resolved CSV output path.

§json_path: String

Resolved JSON output path.

§

OutputReadFailed

Reading or decoding CSV/JSON simulation output failed.

Fields

§path: String

Source output path.

§format: OutputFormat

Output format being read.

§detail: String

Lower-level I/O or decoding error.

§

CheckpointSerializationFailed

Serializing or deserializing a CDT or MCMC checkpoint failed.

Fields

§operation: CheckpointOperation

Checkpoint operation being attempted.

§target: String

Human-readable checkpoint target, such as “final triangulation”.

§detail: String

Lower-level serialization error.

§

CheckpointResumeFailed

Restoring or continuing an MCMC checkpoint failed before sampling resumed.

The CheckpointResumeFailure source is reserved for CDT-owned resume invariants. Upstream MCMC, configuration, and triangulation validation errors are reported through their more specific variants.

Fields

§failure: CheckpointResumeFailure

Structured resume failure with typed context.

Trait Implementations§

Source§

impl Clone for CdtError

Source§

fn clone(&self) -> CdtError

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 CdtError

Source§

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

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

impl Display for CdtError

Source§

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

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

impl Error for CdtError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CdtError> for MetropolisMoveApplicationFailure

Source§

fn from(error: CdtError) -> Self

Converts to this type from the input type.
Source§

impl From<CdtProposalError> for CdtError

Source§

fn from(error: CdtProposalError) -> Self

Converts to this type from the input type.
Source§

impl From<FoliationError> for CdtError

Source§

fn from(source: FoliationError) -> Self

Converts to this type from the input type.
Source§

impl From<McmcError> for CdtError

Source§

fn from(source: McmcError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for CdtError

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for CdtError

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

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DataDebug for T
where T: Debug,