[][src]Trait aleph_alpha_tokenizer::TokenID

pub trait TokenID: PartialEq + Clone {
    fn zero() -> Self;
fn coerce(t: u64) -> Self;
fn restore(self) -> u64; }

A trait to be able to convert token IDs on the fly

Required methods

fn zero() -> Self

Get a zero value

fn coerce(t: u64) -> Self

Convert a u64 to Self

fn restore(self) -> u64

Convert back into u64

Loading content...

Implementations on Foreign Types

impl TokenID for u64[src]

impl TokenID for i64[src]

impl TokenID for i32[src]

impl TokenID for f64[src]

Loading content...

Implementors

Loading content...