[][src]Struct shapefile::record::poly::GenericPolyline

pub struct GenericPolyline<PointType> {
    pub bbox: BBox,
    pub points: Vec<PointType>,
    pub parts: Vec<i32>,
}

Fields

bbox: BBoxpoints: Vec<PointType>parts: Vec<i32>

Methods

impl<PointType: HasXY> GenericPolyline<PointType>[src]

pub fn new(points: Vec<PointType>, parts: Vec<i32>) -> Self[src]

Examples

Creating a Polyline

use shapefile::{Point, Polyline};
let points = vec![
    Point::new(1.0, 1.0),
    Point::new(2.0, 2.0),
];
let poly = Polyline::new(points, vec![0]);

Trait Implementations

impl<PointType> MultipointShape<PointType> for GenericPolyline<PointType>[src]

impl<PointType> MultipartShape<PointType> for GenericPolyline<PointType>[src]

fn part(&self, index: usize) -> Option<&[PointType]>[src]

Returns the slice of points corresponding to part n°ìndex if the shape actually has multiple parts Read more

Important traits for PartIterator<'a, PointType, Shape>
fn parts(&self) -> PartIterator<PointType, Self>[src]

Returns an iterator over the parts of a MultipartShape Read more

impl<PointType> From<GenericPolygon<PointType>> for GenericPolyline<PointType>[src]

impl<PointType> From<GenericPolyline<PointType>> for GenericPolygon<PointType>[src]

impl<PointType> From<GenericPolyline<PointType>> for MultiLineString<f64> where
    PointType: Copy,
    Coordinate<f64>: From<PointType>, 
[src]

impl<PointType> From<Line<f64>> for GenericPolyline<PointType> where
    PointType: From<Point<f64>> + HasXY
[src]

impl<PointType> From<LineString<f64>> for GenericPolyline<PointType> where
    PointType: From<Coordinate<f64>> + HasXY
[src]

impl<PointType> From<MultiLineString<f64>> for GenericPolyline<PointType> where
    PointType: From<Coordinate<f64>> + HasXY
[src]

impl From<GenericPolyline<Point>> for Shape[src]

impl From<GenericPolyline<PointM>> for Shape[src]

impl From<GenericPolyline<PointZ>> for Shape[src]

Auto Trait Implementations

impl<PointType> Sync for GenericPolyline<PointType> where
    PointType: Sync

impl<PointType> Send for GenericPolyline<PointType> where
    PointType: Send

impl<PointType> Unpin for GenericPolyline<PointType> where
    PointType: Unpin

impl<PointType> RefUnwindSafe for GenericPolyline<PointType> where
    PointType: RefUnwindSafe

impl<PointType> UnwindSafe for GenericPolyline<PointType> where
    PointType: UnwindSafe

Blanket Implementations

impl<S> ReadableShape for S where
    S: ConcreteReadableShape
[src]

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

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

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.

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

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

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