pub struct PointValue {
pub srid: i32,
pub x: f64,
pub y: f64,
pub z: Option<f64>,
}Expand description
Cypher point value with SRID and 2D/3D coordinates.
Fields§
§srid: i32§x: f64§y: f64§z: Option<f64>Implementations§
Source§impl PointValue
impl PointValue
pub fn cartesian_2d(x: f64, y: f64) -> Self
pub fn cartesian_3d(x: f64, y: f64, z: f64) -> Self
pub fn wgs84_2d(longitude: f64, latitude: f64) -> Self
pub fn wgs84_3d(longitude: f64, latitude: f64, height: f64) -> Self
Sourcepub fn is_3d(&self) -> bool
pub fn is_3d(&self) -> bool
True for a point carrying a third coordinate. A point’s dimensionality
is part of its CRS (4326/7203 are 2D, 4979/9157 are 3D).
Sourcepub fn crs_name(&self) -> Option<&'static str>
pub fn crs_name(&self) -> Option<&'static str>
The Neo4j CRS name of this point’s coordinate space — wgs-84,
wgs-84-3d, cartesian or cartesian-3d — or None when the
srid/dimensionality pair is outside the four point() codes (a
decoder can produce such a value; point() cannot). The names come
from crate::wire::crs_name, the canonical mapping every surface
shares.
Trait Implementations§
Source§impl Clone for PointValue
impl Clone for PointValue
Source§impl Debug for PointValue
impl Debug for PointValue
Source§impl Display for PointValue
impl Display for PointValue
Source§impl PartialEq for PointValue
impl PartialEq for PointValue
impl StructuralPartialEq for PointValue
Auto Trait Implementations§
impl Forget for PointValue
impl Freeze for PointValue
impl Move for PointValue
impl RefUnwindSafe for PointValue
impl Send for PointValue
impl Sync for PointValue
impl Unpin for PointValue
impl UnsafeUnpin for PointValue
impl UnwindSafe for PointValue
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