[][src]Trait finalfrontier::idx::WordIdx

pub trait WordIdx: Clone {
    fn word_idx(&self) -> u64;
fn from_word_idx(word_idx: u64) -> Self;
fn len(&self) -> usize; fn is_empty(&self) -> bool { ... } }

Vocabulary indexing trait.

This trait defines methods shared by indexing types.

Required methods

fn word_idx(&self) -> u64

Return the unique word index for the WordIdx.

fn from_word_idx(word_idx: u64) -> Self

Build a new WordIdx containing only a single index.

fn len(&self) -> usize

Return the number of indices.

Loading content...

Provided methods

fn is_empty(&self) -> bool

Return whether this is empty.

Loading content...

Implementors

impl WordIdx for SingleIdx[src]

impl WordIdx for WordWithSubwordsIdx[src]

Loading content...