pub trait Curve<const D: usize>: Sized {
// Required methods
fn to_curve(self) -> Vec<Coord<D>>;
fn as_curve(&self) -> &[Coord<D>];
// Provided methods
fn len(&self) -> usize { ... }
fn is_empty(&self) -> bool { ... }
fn closed_lin(self) -> Vec<Coord<D>> { ... }
fn popped_last(self) -> Vec<Coord<D>> { ... }
fn is_closed(&self) -> bool { ... }
}Expand description
Copy-on-write curve type.
Instead of using Cow<Coord<D>>, this is a trait, which
does not require any conversion.
Required Methods§
Provided Methods§
sourcefn closed_lin(self) -> Vec<Coord<D>>
fn closed_lin(self) -> Vec<Coord<D>>
sourcefn popped_last(self) -> Vec<Coord<D>>
fn popped_last(self) -> Vec<Coord<D>>
Remove the last element.
Object Safety§
This trait is not object safe.