Trait rust_tokenizers::TokenTrait[][src]

pub trait TokenTrait {
    fn offset(&self) -> Option<Offset>;
fn mask(&self) -> Mask;
fn as_str(&self) -> &str; }
Expand description

Token abstraction trait to access token fields, irrespective of their form (reference of owned)

Required methods

Returns the offset of the token with respect to the original string

Returns the token mask

Returns a string representation for the token

Implementors