pub trait IsEditablePolygon<V>: IsPolygon<V> {
// Required methods
fn add_vertex(&mut self, vertex: V) -> VId;
fn change_vertex(&mut self, vid: VId, vertex: V) -> Result<()>;
}Expand description
IsEditablePolygon trait used for polygons which can be edited
Required Methods§
Sourcefn add_vertex(&mut self, vertex: V) -> VId
fn add_vertex(&mut self, vertex: V) -> VId
Should add a vertex to the end and return its id
Sourcefn change_vertex(&mut self, vid: VId, vertex: V) -> Result<()>
fn change_vertex(&mut self, vid: VId, vertex: V) -> Result<()>
Should change vertex at vId to the given vertex returning an error on failure
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".