pub enum TopologyError {
NotConnected {
disconnected_parts: Vec<usize>,
},
HasHoles {
boundary_components: usize,
},
VertexOnlyContact {
part_a: usize,
part_b: usize,
},
UnsupportedContact {
part_a: usize,
part_b: usize,
reason: String,
},
TooManyParts {
count: usize,
max: usize,
},
NotCompact {
compactness_ppm: u128,
min_ppm: u128,
},
}Expand description
Topology validation error with structured diagnostic data. Serializable to JSON via serde for WASM boundary.
Variants§
NotConnected
Parts are not all connected via shared edges.
disconnected_parts: indices of parts not reachable from part 0 via BFS.
HasHoles
Boundary graph has multiple connected components (polygon has holes).
boundary_components: number of separate boundary loops found.
VertexOnlyContact
Two parts touch only at a vertex, not along a shared edge.
UnsupportedContact
Two parts have unsupported contact (T-junction, partial overlap, etc.)
TooManyParts
Too many parts for the protocol.
NotCompact
Polygon boundary is not compact enough (isoperimetric ratio too low).
Trait Implementations§
Source§impl Clone for TopologyError
impl Clone for TopologyError
Source§fn clone(&self) -> TopologyError
fn clone(&self) -> TopologyError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TopologyError
impl Debug for TopologyError
Source§impl<'de> Deserialize<'de> for TopologyError
impl<'de> Deserialize<'de> for TopologyError
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 Display for TopologyError
impl Display for TopologyError
Source§impl PartialEq for TopologyError
impl PartialEq for TopologyError
Source§fn eq(&self, other: &TopologyError) -> bool
fn eq(&self, other: &TopologyError) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TopologyError
impl Serialize for TopologyError
impl Eq for TopologyError
impl StructuralPartialEq for TopologyError
Auto Trait Implementations§
impl Freeze for TopologyError
impl RefUnwindSafe for TopologyError
impl Send for TopologyError
impl Sync for TopologyError
impl Unpin for TopologyError
impl UnsafeUnpin for TopologyError
impl UnwindSafe for TopologyError
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