NativeIndex

Trait NativeIndex 

Source
pub trait NativeIndex<Data = f32, Radius = f32>: Index<Data, Radius> {
    type Inner;

    // Required method
    fn inner_ptr(&self) -> *mut Self::Inner;
}
Expand description

Sub-trait for native implementations of a Faiss index.

Anything that implements NativeIndex should provide which native index (i.e. one of FaissIndex or FaissIndexBinary) can be it represented as.

Required Associated Types§

Source

type Inner

The underlying native Faiss index.

Required Methods§

Source

fn inner_ptr(&self) -> *mut Self::Inner

Retrieve a pointer to the native index object.

Implementations on Foreign Types§

Source§

impl<Data, Radius, NI: NativeIndex<Data, Radius>> NativeIndex<Data, Radius> for Box<NI>

Source§

type Inner = <NI as NativeIndex<Data, Radius>>::Inner

Source§

fn inner_ptr(&self) -> *mut Self::Inner

Implementors§