Trait VectorIndex

Source
pub trait VectorIndex:
    Sized
    + Debug
    + Clone {
    type C: Context;

    // Required methods
    fn context(&self) -> &Self::C;
    fn zeros(len: IndexType, ctx: Self::C) -> Self;
    fn len(&self) -> IndexType;
    fn clone_as_vec(&self) -> Vec<IndexType> ;
    fn from_vec(v: Vec<IndexType>, ctx: Self::C) -> Self;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}

Required Associated Types§

Required Methods§

Source

fn context(&self) -> &Self::C

Source

fn zeros(len: IndexType, ctx: Self::C) -> Self

Source

fn len(&self) -> IndexType

Source

fn clone_as_vec(&self) -> Vec<IndexType>

Source

fn from_vec(v: Vec<IndexType>, ctx: Self::C) -> Self

Provided Methods§

Source

fn is_empty(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§