pub enum TriangulateError {
AlreadyTriangulated,
NoEar,
NonFannable,
NotEnoughDarts(usize),
TooManyDarts(usize),
UndefinedFace(&'static str),
}
Expand description
Error-modeling enum for triangulation routines.
Variants§
AlreadyTriangulated
The face to triangulate is already a triangle.
NoEar
The face has no ear to use for triangulation using the ear clipping method.
NonFannable
The face is not fannable, i.e. there is no “star” vertex.
NotEnoughDarts(usize)
The number of darts passed to create the new segments is too low. The usize
value
is the number of missing darts.
TooManyDarts(usize)
The number of darts passed to create the new segments is too high. The usize
value
is the number of excess darts.
UndefinedFace(&'static str)
The face is not fit for triangulation. The String
contains information about the reason.
Trait Implementations§
Source§impl Debug for TriangulateError
impl Debug for TriangulateError
Source§impl Display for TriangulateError
impl Display for TriangulateError
Source§impl Error for TriangulateError
impl Error for TriangulateError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for TriangulateError
impl PartialEq for TriangulateError
impl Eq for TriangulateError
impl StructuralPartialEq for TriangulateError
Auto Trait Implementations§
impl Freeze for TriangulateError
impl RefUnwindSafe for TriangulateError
impl Send for TriangulateError
impl Sync for TriangulateError
impl Unpin for TriangulateError
impl UnwindSafe for TriangulateError
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.