Skip to main content

Transformable

Trait Transformable 

Source
pub trait Transformable: Sized {
    // Required methods
    fn to_coord(&self) -> Coord;
    fn from_coord(c: Coord) -> Self;
}
Expand description

Trait for types that can be transformed through a Transform.

The transform returns the same type as the input, so geo_types::Coord<f64> in gives geo_types::Coord<f64> out, and (f64, f64) in gives (f64, f64) out.

Required Methods§

Source

fn to_coord(&self) -> Coord

Source

fn from_coord(c: Coord) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Transformable for (f64, f64)

Source§

fn to_coord(&self) -> Coord

Source§

fn from_coord(c: Coord) -> Self

Source§

impl Transformable for Coord<f64>

Available on crate feature geo-types only.
Source§

fn to_coord(&self) -> Coord

Source§

fn from_coord(c: Coord) -> Self

Implementors§

Source§

impl Transformable for proj_core::coord::Coord