pub trait SimpleShape<I: IntNumber> {
// Required methods
fn is_simple(&self) -> bool;
fn simplified(&self) -> Option<IntShape<I>>;
}Expand description
A trait for determining if a shape, composed of multiple contours, is simple, and for obtaining a simplified version.
Required Methods§
Sourcefn is_simple(&self) -> bool
fn is_simple(&self) -> bool
Checks if the shape is simple, meaning all its contours are simple.
§Returns
trueif all contours in the shape are simple.falseif any contour is complex.
Sourcefn simplified(&self) -> Option<IntShape<I>>
fn simplified(&self) -> Option<IntShape<I>>
Returns an optional simplified version of the shape.
§Returns
Some(IntShape)containing the simplified shape if simplification is possible.Noneif the shape is degenerate or empty.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".