#[repr(C)]
pub struct Index { /* private fields */ }
Expand description
Represents the USearch index.
Reserves memory for a specified number of incoming vectors.
capacity
- The desired total capacity including the current size.
Retrieves the number of dimensions in the vectors indexed.
Retrieves the connectivity parameter that limits connections-per-node in the graph.
Retrieves the current number of vectors in the index.
Retrieves the total capacity of the index, including reserved space.
Reports expected file size after serialization.
Adds a vector with a specified key to the index.
key
- The key associated with the vector.
vector
- A slice containing the vector data.
Performs k-Approximate Nearest Neighbors (kANN) Search for closest vectors to the provided query.
query
- A slice containing the query vector data.
count
- The maximum number of neighbors to search for.
A Result
containing the matches found.
Removes the vector associated with the given key from the index.
key
- The key of the vector to be removed.
true
if the vector is successfully removed, false
otherwise.
Renames the vector under a certain key.
from
- The key of the vector to be renamed.
to
- The new name.
true
if the vector is successfully renamed, false
otherwise.
Checks if the index contains a vector with a specified key.
key
- The key to be checked.
true
if the index contains the vector with the given key, false
otherwise.
Saves the index to a specified file.
path
- The file path where the index will be saved.
Loads the index from a specified file.
path
- The file path from where the index will be loaded.
Creates a view of the index from a file without loading it into memory.
path
- The file path from where the view will be created.
Saves the index to a specified file.
path
- The file path where the index will be saved.
Loads the index from a specified file.
path
- The file path from where the index will be loaded.
Creates a view of the index from a file without loading it into memory.
path
- The file path from where the view will be created.
A type-level representation of the type’s C++ namespace and type name.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.