Trait Index

Source
pub trait Index
where Self: Sized + Copy + Eq + Hash + Debug,
{ // Required methods fn ty(&self) -> TypeId; fn ordinal(&self) -> usize; fn index_type(&self) -> IndexType; }
Expand description

An Index is a fast lookup mechanism for graph elements.

Indexes allow for efficient querying of graph elements based on different criteria. Each index has a type and can be identified by an ordinal within its type.

Required Methods§

Source

fn ty(&self) -> TypeId

Returns the TypeId of the element being indexed.

Supported types are graph dependent, but all graph implementations support basic Rust types and strings.

Source

fn ordinal(&self) -> usize

Returns the ordinal number of this index.

The ordinal uniquely identifies an index within its index type.

Source

fn index_type(&self) -> IndexType

Returns the type of this index (Hash, Range, or FullText).

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.

Implementations on Foreign Types§

Source§

impl Index for ()

Source§

fn ty(&self) -> TypeId

Source§

fn ordinal(&self) -> usize

Source§

fn index_type(&self) -> IndexType

Implementors§