#[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
MissingSimplex
A simplex required for neighbor wiring was not found.
Fields
simplex_key: SimplexKeyMissing simplex key.
InvalidFacetIndex
A facet index is outside the referenced simplex’s vertex range.
Fields
simplex_key: SimplexKeyReferenced simplex.
FacetIndexOverflow
A facet index cannot fit in the compact facet-index storage type.
WrongSimplexArity
A simplex has the wrong number of vertices for the triangulation dimension.
Fields
simplex_key: SimplexKeySimplex with mismatched arity.
ExternalFacetNotFound
An external facet did not match any new-simplex boundary facet.
Fields
simplex_key: SimplexKeyExternal simplex being glued.
An external facet matched a facet already shared by multiple new simplices.
SelfNeighbor
A simplex points to itself as a neighbor.
Fields
simplex_key: SimplexKeySimplex containing the self-neighbor pointer.
MissingNeighborTarget
A neighbor pointer references a missing simplex.
Fields
simplex_key: SimplexKeySimplex containing the stale neighbor pointer.
neighbor_key: SimplexKeyMissing neighbor key.
AsymmetricNeighbor
A neighbor pointer does not point back through the matching mirror facet.
Fields
simplex_key: SimplexKeySimplex containing the neighbor pointer.
neighbor_key: SimplexKeyNeighbor referenced by simplex_key.
neighbor_back: Option<SimplexKey>Neighbor’s pointer back through the mirror facet.
NeighborWalkExceededSimplexCount
Neighbor traversal discovered more simplices than the TDS contains.
Trait Implementations§
Source§impl Clone for NeighborWiringError
impl Clone for NeighborWiringError
Source§fn clone(&self) -> NeighborWiringError
fn clone(&self) -> NeighborWiringError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NeighborWiringError
impl Debug for NeighborWiringError
Source§impl Display for NeighborWiringError
impl Display for NeighborWiringError
Source§impl Error for NeighborWiringError
impl Error for NeighborWiringError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<NeighborWiringError> for InsertionError
impl From<NeighborWiringError> for InsertionError
Source§fn from(reason: NeighborWiringError) -> Self
fn from(reason: NeighborWiringError) -> Self
Source§impl PartialEq for NeighborWiringError
impl PartialEq for NeighborWiringError
Source§fn eq(&self, other: &NeighborWiringError) -> bool
fn eq(&self, other: &NeighborWiringError) -> bool
self and other values to be equal, and is used by ==.