Skip to main content

TokenEstimator

Trait TokenEstimator 

Source
pub trait TokenEstimator {
    // Required methods
    fn estimate(&self, value: &str) -> usize;
    fn name(&self) -> &'static str;
}

Required Methods§

Source

fn estimate(&self, value: &str) -> usize

Source

fn name(&self) -> &'static str

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§