Skip to main content

NeighborWiringError

Enum NeighborWiringError 

Source
#[non_exhaustive]
pub enum NeighborWiringError { MissingSimplex { simplex_key: SimplexKey, }, InvalidFacetIndex { simplex_key: SimplexKey, facet_index: usize, vertex_count: usize, }, FacetIndexOverflow { facet_index: usize, max: u8, }, WrongSimplexArity { simplex_key: SimplexKey, expected: usize, found: usize, }, ExternalFacetNotFound { simplex_key: SimplexKey, facet_index: u8, facet_hash: u64, }, ExternalFacetAlreadyShared { simplex_key: SimplexKey, facet_index: u8, facet_hash: u64, existing_incidents: usize, }, SelfNeighbor { simplex_key: SimplexKey, }, MissingNeighborTarget { simplex_key: SimplexKey, neighbor_key: SimplexKey, }, AsymmetricNeighbor { simplex_key: SimplexKey, facet_index: usize, neighbor_key: SimplexKey, mirror_facet_index: Option<usize>, neighbor_back: Option<SimplexKey>, }, NeighborWalkExceededSimplexCount { visited: usize, total: usize, }, }
Expand description

Structured reason why neighbor wiring failed.

§Examples

use delaunay::prelude::tds::SimplexKey;
use delaunay::prelude::insertion::NeighborWiringError;
use slotmap::KeyData;

let simplex_key = SimplexKey::from(KeyData::from_ffi(11));
let err = NeighborWiringError::MissingSimplex { simplex_key };
assert!(matches!(err, NeighborWiringError::MissingSimplex { .. }));

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

MissingSimplex

A simplex required for neighbor wiring was not found.

Fields

§simplex_key: SimplexKey

Missing simplex key.

§

InvalidFacetIndex

A facet index is outside the referenced simplex’s vertex range.

Fields

§simplex_key: SimplexKey

Referenced simplex.

§facet_index: usize

Invalid facet index.

§vertex_count: usize

Number of vertices in the referenced simplex.

§

FacetIndexOverflow

A facet index cannot fit in the compact facet-index storage type.

Fields

§facet_index: usize

Facet index that overflowed.

§max: u8

Maximum storable facet index.

§

WrongSimplexArity

A simplex has the wrong number of vertices for the triangulation dimension.

Fields

§simplex_key: SimplexKey

Simplex with mismatched arity.

§expected: usize

Expected number of vertices.

§found: usize

Observed number of vertices.

§

ExternalFacetNotFound

An external facet did not match any new-simplex boundary facet.

Fields

§simplex_key: SimplexKey

External simplex being glued.

§facet_index: u8

Facet index on the external simplex.

§facet_hash: u64

Hash of the external facet vertex set.

§

ExternalFacetAlreadyShared

An external facet matched a facet already shared by multiple new simplices.

Fields

§simplex_key: SimplexKey

External simplex being glued.

§facet_index: u8

Facet index on the external simplex.

§facet_hash: u64

Hash of the external facet vertex set.

§existing_incidents: usize

Number of existing new-simplex incidents for the facet.

§

SelfNeighbor

A simplex points to itself as a neighbor.

Fields

§simplex_key: SimplexKey

Simplex containing the self-neighbor pointer.

§

MissingNeighborTarget

A neighbor pointer references a missing simplex.

Fields

§simplex_key: SimplexKey

Simplex containing the stale neighbor pointer.

§neighbor_key: SimplexKey

Missing neighbor key.

§

AsymmetricNeighbor

A neighbor pointer does not point back through the matching mirror facet.

Fields

§simplex_key: SimplexKey

Simplex containing the neighbor pointer.

§facet_index: usize

Facet index in simplex_key.

§neighbor_key: SimplexKey

Neighbor referenced by simplex_key.

§mirror_facet_index: Option<usize>

Matching facet index in neighbor_key, if one could be found.

§neighbor_back: Option<SimplexKey>

Neighbor’s pointer back through the mirror facet.

§

NeighborWalkExceededSimplexCount

Neighbor traversal discovered more simplices than the TDS contains.

Fields

§visited: usize

Number of unique simplices visited.

§total: usize

Number of simplices in the TDS.

Trait Implementations§

Source§

impl Clone for NeighborWiringError

Source§

fn clone(&self) -> NeighborWiringError

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 NeighborWiringError

Source§

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

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

impl Display for NeighborWiringError

Source§

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

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

impl Error for NeighborWiringError

1.30.0 · 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<NeighborWiringError> for InsertionError

Source§

fn from(reason: NeighborWiringError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for NeighborWiringError

Source§

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

Source§

impl StructuralPartialEq for NeighborWiringError

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,