pub trait Model:
Send
+ Sync
+ Debug {
// Required methods
fn model_type(&self) -> &str;
fn model_path(&self) -> &Path;
fn metadata(&self) -> &HashMap<String, Value>;
fn config(&self) -> EdgeResult<Value>;
fn validate(&self) -> EdgeResult<()>;
}Expand description
Trait representing a model that can be loaded and used for inference
Required Methods§
Sourcefn model_type(&self) -> &str
fn model_type(&self) -> &str
Get the model type (e.g., “onnx”, “tensorrt”, “coreml”)
Sourcefn model_path(&self) -> &Path
fn model_path(&self) -> &Path
Get the model path or identifier
Sourcefn config(&self) -> EdgeResult<Value>
fn config(&self) -> EdgeResult<Value>
Get model configuration as JSON
Sourcefn validate(&self) -> EdgeResult<()>
fn validate(&self) -> EdgeResult<()>
Validate that the model files exist and are valid