pub enum EditError {
StaleHandle,
VerticesNotOnFace,
DegenerateCut,
BordersExterior,
BridgeEdge,
VertexNotDissolvable,
InvalidPolygon,
}Expand description
Errors an edit op can reject with. Build never fails — a malformed input just yields fewer (or zero) interior faces, matching the TS detector.
Variants§
StaleHandle
A referenced id is tombstoned or out of range.
VerticesNotOnFace
split_face: the two vertices aren’t both on the target face.
DegenerateCut
split_face: the two endpoints are the same, or already adjacent on
the face (the cut would have zero area on one side).
BordersExterior
merge_faces: the edge borders the exterior, so there’s no second
room to merge with (that’s a delete, not a merge).
BridgeEdge
merge_faces: both sides are the same face — the edge is a bridge,
and removing it would change connectivity rather than union two rooms.
VertexNotDissolvable
dissolve_vertex: the vertex isn’t a simple degree-2 node (a junction
where 3+ walls meet, or a dangling tip), so there’s no unambiguous pair
of edges to weld into one.
InvalidPolygon
add_face: the ring has fewer than 3 points, self-intersects, or
encloses near-zero area.
Trait Implementations§
impl Eq for EditError
impl StructuralPartialEq for EditError
Auto Trait Implementations§
impl Freeze for EditError
impl RefUnwindSafe for EditError
impl Send for EditError
impl Sync for EditError
impl Unpin for EditError
impl UnsafeUnpin for EditError
impl UnwindSafe for EditError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.