pub trait TextPreparer: Send + Sync {
// Required method
fn prepare(
&self,
text: &str,
options: &NormalizationOptions,
) -> Result<PreparedText, TextPreparationError>;
}Expand description
Model-specific text preparation used by the blocking engine facade.
ftts-core owns this boundary so it never depends on a particular model
crate. Model crates implement it with their tokenizer and retain ownership
of the detailed text trace.
Required Methods§
Sourcefn prepare(
&self,
text: &str,
options: &NormalizationOptions,
) -> Result<PreparedText, TextPreparationError>
fn prepare( &self, text: &str, options: &NormalizationOptions, ) -> Result<PreparedText, TextPreparationError>
Normalizes and tokenizes one request according to its explicit options.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".