pub enum VectorValues {
Float64(Vec<f64>),
Float32(Vec<f32>),
Integer64(Vec<i64>),
Integer32(Vec<i32>),
Integer16(Vec<i16>),
Integer8(Vec<i8>),
}Expand description
Internal storage for a vector. One variant per supported coordinate
type; dimension is implicit in the inner Vec’s length.
Variants§
Float64(Vec<f64>)
Float32(Vec<f32>)
Integer64(Vec<i64>)
Integer32(Vec<i32>)
Integer16(Vec<i16>)
Integer8(Vec<i8>)
Implementations§
Source§impl VectorValues
impl VectorValues
pub fn coordinate_type(&self) -> VectorCoordinateType
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn as_f64_vec(&self) -> Vec<f64>
pub fn as_f64_vec(&self) -> Vec<f64>
Lossless conversion of every coordinate to f64. Used by every
vector-math function so the implementations can share one
f32-precision accumulator irrespective of the underlying storage.
Sourcepub fn to_i64_vec(&self) -> Vec<i64>
pub fn to_i64_vec(&self) -> Vec<i64>
Convert every coordinate to i64, truncating fractional parts for
float-backed vectors. Matches the semantics required by
toIntegerList(vector).
Trait Implementations§
Source§impl Clone for VectorValues
impl Clone for VectorValues
Source§fn clone(&self) -> VectorValues
fn clone(&self) -> VectorValues
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VectorValues
impl Debug for VectorValues
Source§impl PartialEq for VectorValues
impl PartialEq for VectorValues
impl StructuralPartialEq for VectorValues
Auto Trait Implementations§
impl Freeze for VectorValues
impl RefUnwindSafe for VectorValues
impl Send for VectorValues
impl Sync for VectorValues
impl Unpin for VectorValues
impl UnsafeUnpin for VectorValues
impl UnwindSafe for VectorValues
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