pub struct VectorRef<'a> { /* private fields */ }Implementations§
Source§impl<'a> VectorRef<'a>
impl<'a> VectorRef<'a>
Sourcepub fn from_encoded(encoded: &'a [u8]) -> Result<Self>
pub fn from_encoded(encoded: &'a [u8]) -> Result<Self>
Validates length and finite components before any caller-owned allocation.
Sourcepub fn from_encoded_with_work<T, E>(
encoded: &'a [u8],
start: impl FnMut() -> Result<T, E>,
finish: impl FnMut(T) -> Result<(), E>,
map_invalid: impl Fn(HawDBError) -> E,
) -> Result<Self, E>
pub fn from_encoded_with_work<T, E>( encoded: &'a [u8], start: impl FnMut() -> Result<T, E>, finish: impl FnMut(T) -> Result<(), E>, map_invalid: impl Fn(HawDBError) -> E, ) -> Result<Self, E>
Each work unit scans at most 64 KiB; callbacks own admission and cancellation.
pub const fn dimension(self) -> VectorDimension
pub const fn encoded(self) -> &'a [u8] ⓘ
pub fn coordinates(self) -> impl ExactSizeIterator<Item = f32> + 'a
Trait Implementations§
impl<'a> Copy for VectorRef<'a>
impl<'a> Eq for VectorRef<'a>
Source§impl<'a> Ord for VectorRef<'a>
impl<'a> Ord for VectorRef<'a>
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<'a> PartialOrd for VectorRef<'a>
impl<'a> PartialOrd for VectorRef<'a>
impl<'a> StructuralPartialEq for VectorRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for VectorRef<'a>
impl<'a> RefUnwindSafe for VectorRef<'a>
impl<'a> Send for VectorRef<'a>
impl<'a> Sync for VectorRef<'a>
impl<'a> Unpin for VectorRef<'a>
impl<'a> UnsafeUnpin for VectorRef<'a>
impl<'a> UnwindSafe for VectorRef<'a>
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