pub struct PointM {
pub x: f64,
pub y: f64,
pub m: f64,
}
Expand description
Point with x
, y
, m
Fields§
§x: f64
§y: f64
§m: f64
Implementations§
Source§impl PointM
impl PointM
Sourcepub fn new(x: f64, y: f64, m: f64) -> Self
pub fn new(x: f64, y: f64, m: f64) -> Self
Creates a new pointM
§Examples
use shapefile::PointM;
let point = PointM::new(1.0, 42.0, 13.37);
assert_eq!(point.x, 1.0);
assert_eq!(point.y, 42.0);
assert_eq!(point.m, 13.37);
use shapefile::{PointM, NO_DATA};
let point = PointM::default();
assert_eq!(point.x, 0.0);
assert_eq!(point.y, 0.0);
assert_eq!(point.m, NO_DATA);
Trait Implementations§
Source§impl ConcreteReadableShape for PointM
impl ConcreteReadableShape for PointM
Source§impl CoordTrait for &PointM
impl CoordTrait for &PointM
Source§fn dim(&self) -> Dimensions
fn dim(&self) -> Dimensions
Dimensions of the coordinate tuple
Source§fn nth_or_panic(&self, n: usize) -> Self::T
fn nth_or_panic(&self, n: usize) -> Self::T
Access the n’th (0-based) element of the CoordinateTuple.
May panic if n >= DIMENSION.
See also
nth()
.Source§impl CoordTrait for PointM
impl CoordTrait for PointM
Source§fn dim(&self) -> Dimensions
fn dim(&self) -> Dimensions
Dimensions of the coordinate tuple
Source§fn nth_or_panic(&self, n: usize) -> Self::T
fn nth_or_panic(&self, n: usize) -> Self::T
Access the n’th (0-based) element of the CoordinateTuple.
May panic if n >= DIMENSION.
See also
nth()
.Source§impl PointTrait for &PointM
impl PointTrait for &PointM
Source§type CoordType<'a> = &'a PointM
where
Self: 'a
type CoordType<'a> = &'a PointM where Self: 'a
The type of the underlying coordinate, which implements CoordTrait
Source§fn dim(&self) -> Dimensions
fn dim(&self) -> Dimensions
Dimensions of the coordinate tuple
Source§impl PointTrait for PointM
impl PointTrait for PointM
Source§type CoordType<'a> = &'a PointM
where
Self: 'a
type CoordType<'a> = &'a PointM where Self: 'a
The type of the underlying coordinate, which implements CoordTrait
Source§fn dim(&self) -> Dimensions
fn dim(&self) -> Dimensions
Dimensions of the coordinate tuple
Source§impl WritableShape for PointM
impl WritableShape for PointM
impl ConcreteShape for PointM
impl Copy for PointM
impl StructuralPartialEq for PointM
Auto Trait Implementations§
impl Freeze for PointM
impl RefUnwindSafe for PointM
impl Send for PointM
impl Sync for PointM
impl Unpin for PointM
impl UnwindSafe for PointM
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more