pub trait LoadedModel: Send + Sync {
// Required method
fn as_any(&self) -> &dyn Any;
// Provided methods
fn as_chat(&self) -> Option<&dyn ChatModel> { ... }
fn as_stream(&self) -> Option<&dyn StreamingModel> { ... }
}Expand description
A model whose weights are in memory. Engines downcast it back to
their own type through as_any.
Required Methods§
Provided Methods§
Sourcefn as_stream(&self) -> Option<&dyn StreamingModel>
fn as_stream(&self) -> Option<&dyn StreamingModel>
The streaming interface, for loaded speech models.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".