pub enum Coord {
F(f64),
I(i64),
}Expand description
One coordinate of a packed vector, for display and encoding: the
per-Value arms it replaces (CypherValue::Int / CypherValue::Float)
had distinct renderings, so the packed read keeps the distinction.
Variants§
Implementations§
Source§impl Coord
impl Coord
Sourcepub fn text(&self) -> String
pub fn text(&self) -> String
The coordinate’s scalar text — the rendering the per-Value walk
produced (Value::Float’s float_text, Value::Int’s
to_string), identical for the literal and display walks.
Sourcepub fn to_le_bytes(self) -> [u8; 8]
pub fn to_le_bytes(self) -> [u8; 8]
The coordinate’s little-endian bytes — i64’s for an integer,
f64’s for a float (the two share the byte mix the hash walks
use, exactly as Value::Int/Value::Float always did).
Trait Implementations§
impl Copy for Coord
Source§impl PartialEq for Coord
The one coordinate equality — Coord::numeric_eq, so the container
(VectorCoords’ PartialEq) and its elements cannot disagree.
impl PartialEq for Coord
The one coordinate equality — Coord::numeric_eq, so the container
(VectorCoords’ PartialEq) and its elements cannot disagree.
Auto Trait Implementations§
impl Forget for Coord
impl Freeze for Coord
impl Move for Coord
impl RefUnwindSafe for Coord
impl Send for Coord
impl Sync for Coord
impl Unpin for Coord
impl UnsafeUnpin for Coord
impl UnwindSafe for Coord
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