Skip to main content

PathExt

Trait PathExt 

Source
pub trait PathExt: Path + Sized {
    // Required methods
    fn reverse(self) -> Reverse<Self>;
    fn concat<Q>(self, other: Q) -> Concat<Self, Q>
       where Q: Path<Scalar = Self::Scalar, Point = Self::Point, Error = Self::Error>;
    fn offset(self, d: Self::Scalar) -> Offset<Self, Self::Scalar>
       where Self: Tangent + Heading;
}
Expand description

Ergonomic methods for path composition and transformation.

Provides .reverse(), .concat(), and .offset() methods on any type implementing Path (with additional bounds where required).

Required Methods§

Source

fn reverse(self) -> Reverse<Self>

Reverse the path direction.

Source

fn concat<Q>(self, other: Q) -> Concat<Self, Q>
where Q: Path<Scalar = Self::Scalar, Point = Self::Point, Error = Self::Error>,

Concatenate this path with another, compatible path.

Source

fn offset(self, d: Self::Scalar) -> Offset<Self, Self::Scalar>
where Self: Tangent + Heading,

Offset the path by a distance d. Requires tangent and heading support.

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.

Implementors§

Source§

impl<P: Path + Sized> PathExt for P