IndexExt

Trait IndexExt 

Source
pub trait IndexExt: Sized {
    // Required methods
    fn new() -> Self;
    fn add(&mut self, other: Index);
    fn mark_invalid(&mut self);
    fn add_term(&mut self, term: Term, value: usize);
    fn add_mapping<I>(&mut self, value: usize)
       where I: M;
    fn ident_value(&self, ident: Ident) -> RResult<usize, IndexValueError>;
    fn finalize(self) -> RResult<RSortedMap<Term, usize>, ()>;
    fn gen_indexes(&self, mapping: FMapping) -> RVec<Index>;
}
Expand description

Methods for Index.

Required Methods§

Source

fn new() -> Self

Creates a new empty index.

Source

fn add(&mut self, other: Index)

Adds another index to this index.

Source

fn mark_invalid(&mut self)

Marks this index as invalid.

Source

fn add_term(&mut self, term: Term, value: usize)

Adds a term to this index.

Source

fn add_mapping<I>(&mut self, value: usize)
where I: M,

Adds a mapping to this index.

Source

fn ident_value(&self, ident: Ident) -> RResult<usize, IndexValueError>

Returns the contribution of a specific ident to this Index.

Source

fn finalize(self) -> RResult<RSortedMap<Term, usize>, ()>

Finalizes the index.

Source

fn gen_indexes(&self, mapping: FMapping) -> RVec<Index>

Generates all possible indexes based on the given mapping.

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§