[][src]Enum flexpolyline::Polyline

pub enum Polyline {
    Data2d {
        coordinates: Vec<(f64, f64)>,
        precision2d: Precision,
    },
    Data3d {
        coordinates: Vec<(f64, f64, f64)>,
        precision2d: Precision,
        precision3d: Precision,
        type3d: Type3d,
    },
}

2- or 3-dimensional polyline

Variants

Data2d

2-dimensional polyline

Fields of Data2d

coordinates: Vec<(f64, f64)>

List of 2D coordinates making up this polyline

precision2d: Precision

Precision of the coordinates (e.g. used for encoding, or to report the precision supplied in encoded data)

Data3d

3-dimensional polyline

Fields of Data3d

coordinates: Vec<(f64, f64, f64)>

List of 3D coordinates making up this polyline

precision2d: Precision

Precision of the 2D part of the coordinates (e.g. used for encoding, or to report the precision supplied in encoded data)

precision3d: Precision

Precision of the 3D part of the coordinates (e.g. used for encoding, or to report the precision supplied in encoded data)

type3d: Type3d

Type of the 3D component

Methods

impl Polyline[src]

pub fn encode(&self) -> Result<String, Error>[src]

Encodes a polyline into a string.

The precision of the polyline is used to round coordinates, so the transformation is lossy in nature.

pub fn decode<S: AsRef<str>>(encoded: S) -> Result<Self, Error>[src]

Decodes an encoded polyline.

Trait Implementations

impl Clone for Polyline[src]

impl Debug for Polyline[src]

impl Display for Polyline[src]

impl PartialEq<Polyline> for Polyline[src]

impl StructuralPartialEq for Polyline[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.