pub struct EstimationOptions {
pub default_chars_per_token: f64,
pub language_configs: Vec<LanguageConfig>,
}Expand description
Options for estimate_token_count_with_options.
Fields§
§default_chars_per_token: f64Fallback characters-per-token ratio when no language matches.
language_configs: Vec<LanguageConfig>Language-specific overrides, checked in order.
Trait Implementations§
Source§impl Clone for EstimationOptions
impl Clone for EstimationOptions
Source§fn clone(&self) -> EstimationOptions
fn clone(&self) -> EstimationOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EstimationOptions
impl RefUnwindSafe for EstimationOptions
impl Send for EstimationOptions
impl Sync for EstimationOptions
impl Unpin for EstimationOptions
impl UnwindSafe for EstimationOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more