pub trait InferencePlugin:
Send
+ Sync
+ Debug {
Show 16 methods
// Required methods
fn clone_box(&self) -> Box<dyn InferencePlugin>;
fn model_name(&self) -> &'static str;
fn model_cli_param_name(&self) -> &'static str;
fn model_creation_date(&self) -> &'static str;
fn owned_by(&self) -> &'static str;
fn create_cli_flags_fn(&self) -> CreateCliFlagsFn;
fn downloader(&self) -> Option<fn() -> InferenceResult<Option<Stats>>>;
fn is_downloaded(&self) -> bool;
fn deleter(&self) -> Option<fn() -> InferenceResult<Option<Stats>>>;
fn parse_cli_config(&self, args: &ArgMatches);
fn parse_json_config(&self, json: &str);
fn load(&self) -> InferenceResult<Option<Stats>>;
fn is_loaded(&self) -> bool;
fn unload(&self) -> InferenceResult<Option<Stats>>;
fn run_job(&self, job: InferenceJob) -> InferenceResult<Stats>;
fn clear_state(&self) -> InferenceResult<()>;
}Required Methods§
fn clone_box(&self) -> Box<dyn InferencePlugin>
fn model_name(&self) -> &'static str
fn model_cli_param_name(&self) -> &'static str
fn model_creation_date(&self) -> &'static str
fn owned_by(&self) -> &'static str
fn create_cli_flags_fn(&self) -> CreateCliFlagsFn
fn downloader(&self) -> Option<fn() -> InferenceResult<Option<Stats>>>
fn is_downloaded(&self) -> bool
fn deleter(&self) -> Option<fn() -> InferenceResult<Option<Stats>>>
fn parse_cli_config(&self, args: &ArgMatches)
fn parse_json_config(&self, json: &str)
fn load(&self) -> InferenceResult<Option<Stats>>
fn is_loaded(&self) -> bool
fn unload(&self) -> InferenceResult<Option<Stats>>
fn run_job(&self, job: InferenceJob) -> InferenceResult<Stats>
fn clear_state(&self) -> InferenceResult<()>
Trait Implementations§
Source§impl Clone for Box<dyn InferencePlugin>
impl Clone for Box<dyn InferencePlugin>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more