Skip to main content

CdtValidationFailure

Enum CdtValidationFailure 

Source
#[non_exhaustive]
pub enum CdtValidationFailure { BackendGeometry { detail: String, }, FaceVerticesUnavailable { face: String, detail: String, }, FaceVertexCount { face: String, actual: usize, expected: usize, }, MissingVertexTimeLabel { vertex: String, }, InvalidCdtTriangle { face: String, spacelike_edges: u8, timelike_edges: u8, }, VertexCoordinateReadFailed { vertex: String, detail: String, }, VertexCoordinateDimension { vertex: String, actual: usize, expected_minimum: usize, }, NonStrictSimplex { face: String, }, ErgodicMoveCandidateGeometry { detail: String, }, }
Expand description

Structured detail for crate-owned CDT validation failures.

This refines CdtError::ValidationFailed beyond a coarse CdtValidationCheck so callers can inspect common CDT invariant failures without parsing display text. Variants still keep string diagnostics where the source is an upstream backend message or an opaque backend handle.

§Examples

use causal_triangulations::prelude::errors::CdtValidationFailure;

let failure = CdtValidationFailure::InvalidCdtTriangle {
    face: "FaceKey(3v1)".to_string(),
    spacelike_edges: 3,
    timelike_edges: 0,
};

assert!(format!("{failure}").contains("spacelike=3"));

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.
§

BackendGeometry

Generic backend geometry validation failed with an upstream diagnostic.

Fields

§detail: String

Upstream geometry validation diagnostic.

§

FaceVerticesUnavailable

Face vertices could not be resolved through the geometry backend.

Fields

§face: String

Face being validated.

§detail: String

Lower-level face-vertex lookup diagnostic.

§

FaceVertexCount

A face had the wrong number of vertices for a CDT triangle.

Fields

§face: String

Face being validated.

§actual: usize

Number of vertices observed.

§expected: usize

Number of vertices expected.

§

MissingVertexTimeLabel

A vertex in a foliated triangulation was missing its time label.

Fields

§vertex: String

Vertex missing its time label.

§

InvalidCdtTriangle

A triangle had the wrong spacelike/timelike edge pattern.

Fields

§face: String

Face being validated.

§spacelike_edges: u8

Number of spacelike edges observed.

§timelike_edges: u8

Number of timelike edges observed.

§

VertexCoordinateReadFailed

Coordinate lookup failed while assigning foliation labels.

Fields

§vertex: String

Vertex whose coordinates could not be read.

§detail: String

Lower-level coordinate lookup diagnostic.

§

VertexCoordinateDimension

A vertex coordinate did not have enough dimensions for foliation assignment.

Fields

§vertex: String

Vertex whose coordinate dimensionality was invalid.

§actual: usize

Number of coordinates observed.

§expected_minimum: usize

Minimum number of coordinates expected.

§

NonStrictSimplex

A foliated face was not classifiable as a strict Up or Down CDT simplex.

Fields

§face: String

Face being classified.

§

ErgodicMoveCandidateGeometry

Local ergodic-move candidate geometry failed a post-mutation invariant.

Fields

§detail: String

Diagnostic for the failed local candidate.

Trait Implementations§

Source§

impl Clone for CdtValidationFailure

Source§

fn clone(&self) -> CdtValidationFailure

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 CdtValidationFailure

Source§

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

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

impl Display for CdtValidationFailure

Source§

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

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

impl Hash for CdtValidationFailure

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for CdtValidationFailure

Source§

fn eq(&self, other: &CdtValidationFailure) -> 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 Eq for CdtValidationFailure

Source§

impl StructuralPartialEq for CdtValidationFailure

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,

Source§

impl<T> GeometryHandle for T
where T: Clone + Eq + Hash + Debug,