#[non_exhaustive]pub struct EngineInfo {
pub family: EngineFamily,
pub capabilities: ModelCapabilities,
pub model_label: Option<String>,
pub source_path: Option<PathBuf>,
}Expand description
Information about an voxora_traits::AsrEngine (or its crate::adapter::EngineAdapter).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.family: EngineFamilyWhich engine family this engine belongs to.
capabilities: ModelCapabilitiesCapabilities reported by the underlying model.
model_label: Option<String>Optional human-readable identifier (e.g. whisper’s
whisper_model_type_readable).
source_path: Option<PathBuf>Optional on-disk path that the engine was loaded from.
Implementations§
Source§impl EngineInfo
impl EngineInfo
Sourcepub fn new(family: EngineFamily, capabilities: ModelCapabilities) -> Self
pub fn new(family: EngineFamily, capabilities: ModelCapabilities) -> Self
Construct an EngineInfo with the required fields; the
optional model_label and source_path start as None and
can be filled in via the builder helpers below.
Sourcepub fn with_model_label(self, label: impl Into<String>) -> Self
pub fn with_model_label(self, label: impl Into<String>) -> Self
Set the human-readable model label and return self for
chaining.
Sourcepub fn with_source_path(self, path: impl Into<PathBuf>) -> Self
pub fn with_source_path(self, path: impl Into<PathBuf>) -> Self
Set the on-disk path the engine was loaded from and return
self for chaining.
Trait Implementations§
Source§impl Clone for EngineInfo
impl Clone for EngineInfo
Source§fn clone(&self) -> EngineInfo
fn clone(&self) -> EngineInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EngineInfo
impl Debug for EngineInfo
impl Eq for EngineInfo
Source§impl PartialEq for EngineInfo
impl PartialEq for EngineInfo
impl StructuralPartialEq for EngineInfo
Auto Trait Implementations§
impl Freeze for EngineInfo
impl RefUnwindSafe for EngineInfo
impl Send for EngineInfo
impl Sync for EngineInfo
impl Unpin for EngineInfo
impl UnsafeUnpin for EngineInfo
impl UnwindSafe for EngineInfo
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