pub trait Map: Sized {
    type Output<Kind>
       where Kind: CoordinateSpace;

    // Required method
    fn map<Kind: CoordinateSpace>(
        self,
        f: impl FnOnce(Self::Output<Kind>) -> Self::Output<Kind>
    ) -> Self::Output<Kind>;
}
Expand description

Mapping from one coordinate space to another.

Required Associated Types§

source

type Output<Kind> where Kind: CoordinateSpace

The output type with the new coordinate space.

Required Methods§

source

fn map<Kind: CoordinateSpace>( self, f: impl FnOnce(Self::Output<Kind>) -> Self::Output<Kind> ) -> Self::Output<Kind>

Map from one coordinate space to another by applying a function.

Implementors§

source§

impl<N, Kind: CoordinateSpace> Map for Point<N, Kind>

§

type Output<Kind2> where Kind2: CoordinateSpace = Point<N, Kind2>

source§

impl<N: Sign + Copy, Kind: CoordinateSpace> Map for Rectangle<N, Kind>

§

type Output<Kind2> where Kind2: CoordinateSpace = Rectangle<N, Kind2>

source§

impl<N: Sign, Kind: CoordinateSpace> Map for Extent<N, Kind>

§

type Output<Kind2> where Kind2: CoordinateSpace = Extent<N, Kind2>