pub struct VectorIndexDescriptor { /* private fields */ }Implementations§
Source§impl VectorIndexDescriptor
impl VectorIndexDescriptor
Sourcepub fn encode(&self) -> Vec<u8> ⓘ
pub fn encode(&self) -> Vec<u8> ⓘ
Encode after admitting MAX_VECTOR_INDEX_DESCRIPTOR_BYTES of scratch.
The enclosing immutable artifact supplies integrity and source identity.
Sourcepub fn decode(bytes: &[u8]) -> Result<VectorIndexDescriptor, HawDBError>
pub fn decode(bytes: &[u8]) -> Result<VectorIndexDescriptor, HawDBError>
Decode after admitting the descriptor bound. Unknown formats and trailing bytes are refused; partially understood definitions cannot serve queries.
Source§impl VectorIndexDescriptor
impl VectorIndexDescriptor
Sourcepub fn new(
name: String,
target: VectorIndexTarget,
dimension: VectorDimension,
distance: VectorDistance,
backend: VectorIndexBackend,
schema_digest: [u8; 32],
) -> Result<VectorIndexDescriptor, HawDBError>
pub fn new( name: String, target: VectorIndexTarget, dimension: VectorDimension, distance: VectorDistance, backend: VectorIndexBackend, schema_digest: [u8; 32], ) -> Result<VectorIndexDescriptor, HawDBError>
Constructs a validated definition. The facade must resolve the target, dimension and digest against its pinned canonical schema before use.
pub fn name(&self) -> &str
pub fn target(&self) -> &VectorIndexTarget
pub const fn dimension(&self) -> VectorDimension
pub const fn distance(&self) -> VectorDistance
pub const fn backend(&self) -> VectorIndexBackend
pub const fn schema_digest(&self) -> &[u8; 32]
pub fn retained_bytes(&self) -> usize
Trait Implementations§
Source§impl Clone for VectorIndexDescriptor
impl Clone for VectorIndexDescriptor
Source§fn clone(&self) -> VectorIndexDescriptor
fn clone(&self) -> VectorIndexDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 VectorIndexDescriptor
impl Debug for VectorIndexDescriptor
impl Eq for VectorIndexDescriptor
Source§impl PartialEq for VectorIndexDescriptor
impl PartialEq for VectorIndexDescriptor
impl StructuralPartialEq for VectorIndexDescriptor
Auto Trait Implementations§
impl Forget for VectorIndexDescriptor
impl Freeze for VectorIndexDescriptor
impl Move for VectorIndexDescriptor
impl RefUnwindSafe for VectorIndexDescriptor
impl Send for VectorIndexDescriptor
impl Sync for VectorIndexDescriptor
impl Unpin for VectorIndexDescriptor
impl UnsafeUnpin for VectorIndexDescriptor
impl UnwindSafe for VectorIndexDescriptor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more