pub struct Coords { /* private fields */ }Expand description
Represent a list of coordinates. For each pair, the first float is the longitude, or x, and the second is the latitude, or y.
Implementations§
Source§impl<'a> Coords
impl<'a> Coords
Sourcepub unsafe fn from_bytes(data: &'a [u8]) -> &'a Self
pub unsafe fn from_bytes(data: &'a [u8]) -> &'a Self
§Safety
The data must contains and even number of f64 and be aligned on 64 bits.
Sourcepub unsafe fn from_slice(data: &[f64]) -> &Self
pub unsafe fn from_slice(data: &[f64]) -> &Self
§Safety
The data must contain an even number of f64.
Sourcepub unsafe fn from_slice_mut(data: &mut [f64]) -> &mut Self
pub unsafe fn from_slice_mut(data: &mut [f64]) -> &mut Self
§Safety
The data must contain an even number of f64.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Return the number of crate::Coords stored.
Sourcepub fn iter(&self) -> impl Iterator<Item = &Coord>
pub fn iter(&self) -> impl Iterator<Item = &Coord>
Return the individual crate::Coords.
Sourcepub fn consecutive_pairs(&self) -> impl Iterator<Item = &[f64]>
pub fn consecutive_pairs(&self) -> impl Iterator<Item = &[f64]>
Return all the consecutive pairs of crate::Coords.