pub trait Convert<T, U> {
    type Output;

    // Required method
    fn convert(&self) -> Self::Output;
}
Expand description

Convert (infalliby) the type of a geometry’s coordinate value.

§Examples

use geo::{Convert, LineString, line_string};

let line_string_32: LineString<f32> = line_string![
    (x: 5., y: 10.),
    (x: 3., y: 1.),
    (x: 8., y: 9.),
];

let line_string_64: LineString<f64> = line_string_32.convert();

Required Associated Types§

Required Methods§

source

fn convert(&self) -> Self::Output

Implementors§

source§

impl<G, T: CoordNum, U> Convert<T, U> for G
where G: MapCoords<T, U>, U: From<T> + CoordNum,

§

type Output = <G as MapCoords<T, U>>::Output