pub trait SegmentedPath: Path {
type Segment: PathSegment<Scalar = Self::Scalar, Point = Self::Point, Error = Self::Error>;
// Required methods
fn segment_count(&self) -> usize;
fn segments(&self) -> impl Iterator<Item = &Self::Segment> + '_;
fn locate(
&self,
s: Self::Scalar,
) -> Result<(usize, Self::Scalar), Self::Error>;
// Provided method
fn segment(&self, i: usize) -> Option<&Self::Segment> { ... }
}Expand description
A path made up of multiple PathSegments.
Provides methods to enumerate segments, access them by index, and map a
global arc-length parameter to a (segment_index, local_s) pair.
Required Associated Types§
Required Methods§
Sourcefn segment_count(&self) -> usize
fn segment_count(&self) -> usize
Number of segments in this path.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.