bolt_proto/value/
point_3d.rs

1use bolt_proto_derive::*;
2
3use crate::value::SIGNATURE_POINT_3D;
4
5#[bolt_structure(SIGNATURE_POINT_3D)]
6#[derive(Debug, Clone, PartialEq)]
7pub struct Point3D {
8    pub(crate) srid: i32,
9    pub(crate) x: f64,
10    pub(crate) y: f64,
11    pub(crate) z: f64,
12}
13
14impl Point3D {
15    pub fn new(srid: i32, x: f64, y: f64, z: f64) -> Self {
16        Self { srid, x, y, z }
17    }
18
19    pub fn srid(&self) -> i32 {
20        self.srid
21    }
22
23    pub fn x(&self) -> f64 {
24        self.x
25    }
26
27    pub fn y(&self) -> f64 {
28        self.y
29    }
30
31    pub fn z(&self) -> f64 {
32        self.z
33    }
34}