pub struct Vector { /* private fields */ }Implementations§
Source§impl Vector
impl Vector
pub fn new(coordinates: &[f32]) -> Result<Self>
Sourcepub fn from_encoded(encoded: Vec<u8>) -> Result<Self>
pub fn from_encoded(encoded: Vec<u8>) -> Result<Self>
Takes ownership of an already admitted payload without an additional copy.
Sourcepub fn from_encoded_with_work<T, E>(
encoded: Vec<u8>,
start: impl FnMut() -> Result<T, E>,
finish: impl FnMut(T) -> Result<(), E>,
invalid: impl Fn(HawDBError) -> E,
) -> Result<Self, E>
pub fn from_encoded_with_work<T, E>( encoded: Vec<u8>, start: impl FnMut() -> Result<T, E>, finish: impl FnMut(T) -> Result<(), E>, invalid: impl Fn(HawDBError) -> E, ) -> Result<Self, E>
Validates in bounded units before taking ownership, without rescanning.
pub fn dimension(&self) -> VectorDimension
pub fn retained_capacity(&self) -> usize
pub fn as_ref(&self) -> VectorRef<'_>
pub fn encoded(&self) -> &[u8] ⓘ
Trait Implementations§
impl Eq for Vector
Source§impl Ord for Vector
impl Ord for Vector
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Vector
impl PartialOrd for Vector
impl StructuralPartialEq for Vector
Auto Trait Implementations§
impl Freeze for Vector
impl RefUnwindSafe for Vector
impl Send for Vector
impl Sync for Vector
impl Unpin for Vector
impl UnsafeUnpin for Vector
impl UnwindSafe for Vector
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