pub trait Vertex: Copy + PartialEq {
// Required methods
fn position(&self) -> Coord<i32>;
fn with_position(self, position: Coord<i32>) -> Self;
}Expand description
A polyline vertex the slicer can clip: an integer position plus an opaque Copy + PartialEq payload
that is preserved verbatim through slicing and merging.
Required Methods§
Sourcefn position(&self) -> Coord<i32>
fn position(&self) -> Coord<i32>
The integer (x, y) used for every clipping and tiling decision.
Sourcefn with_position(self, position: Coord<i32>) -> Self
fn with_position(self, position: Coord<i32>) -> Self
A copy of self moved to position, keeping the payload unchanged. Used to re-express a
vertex in a tile-local frame (position − origin).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".