Struct geo_types::MultiPoint

source ·
pub struct MultiPoint<T>(pub Vec<Point<T>>)
where
    T: CoordinateType
;
Expand description

A collection of Points

Examples

Iterating over a MultiPoint yields the Points inside.

use geo_types::{MultiPoint, Point};
let points: MultiPoint<_> = vec![(0., 0.), (1., 2.)].into();
for point in points {
    println!("Point x = {}, y = {}", point.x(), point.y());
}

Tuple Fields

0: Vec<Point<T>>

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Convert a single Point (or something which can be converted to a Point) into a one-member MultiPoint

Converts to this type from the input type.

Convert a Vec of Points (or Vec of things which can be converted to a Point) into a MultiPoint.

Collect the results of a Point iterator into a MultiPoint

Iterate over the Points in this MultiPoint.

The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.