Struct ru_annoy::AnnoyIndex [−][src]
Fields
dimension: usize
index_type: IndexType
node_size: usize
size: usize
Implementations
impl AnnoyIndex
[src]
pub fn load(
dimension: usize,
index_file_path: &str,
index_type: IndexType
) -> Result<AnnoyIndex, Box<dyn Error>>
[src]
dimension: usize,
index_file_path: &str,
index_type: IndexType
) -> Result<AnnoyIndex, Box<dyn Error>>
Trait Implementations
impl AnnoyIndexSearchApi for AnnoyIndex
[src]
fn get_item_vector(&self, item_index: i64) -> Vec<f32>
[src]
fn get_nearest(
&self,
query_vector: &[f32],
n_results: usize,
search_k: i32,
should_include_distance: bool
) -> AnnoyIndexSearchResult
[src]
&self,
query_vector: &[f32],
n_results: usize,
search_k: i32,
should_include_distance: bool
) -> AnnoyIndexSearchResult
fn get_nearest_to_item(
&self,
item_index: i64,
n_results: usize,
search_k: i32,
should_include_distance: bool
) -> AnnoyIndexSearchResult
[src]
&self,
item_index: i64,
n_results: usize,
search_k: i32,
should_include_distance: bool
) -> AnnoyIndexSearchResult
Auto Trait Implementations
impl !RefUnwindSafe for AnnoyIndex
impl !Send for AnnoyIndex
impl !Sync for AnnoyIndex
impl Unpin for AnnoyIndex
impl UnwindSafe for AnnoyIndex
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,