pub struct PgCube {
pub coordinates: Vec<f64>,
pub is_point: bool,
}Expand description
PostgreSQL CUBE type – an n-dimensional point or box.
CUBE is a PostgreSQL extension type for multi-dimensional geometric data. It represents either a point (all dimensions equal) or a box (two corners).
Binary wire format:
ndim(u32): number of dimensionsflags(u32): bit 0 = is_point- coordinates:
ndimf64 values for points,ndim * 2for boxes
Uses TEXT OID as carrier since CUBE is an extension type.
Fields§
§coordinates: Vec<f64>For a point: [x, y, z, ...] (ndim values).
For a box: [x1, y1, z1, ..., x2, y2, z2, ...] (ndim * 2 values).
is_point: boolTrue if this represents a point, false if a box.
Implementations§
Trait Implementations§
Source§impl ToSql for PgCube
impl ToSql for PgCube
impl StructuralPartialEq for PgCube
Auto Trait Implementations§
impl Freeze for PgCube
impl RefUnwindSafe for PgCube
impl Send for PgCube
impl Sync for PgCube
impl Unpin for PgCube
impl UnsafeUnpin for PgCube
impl UnwindSafe for PgCube
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