pub trait ResourceProvider {
    fn get_local_path(&self) -> Result<PathBuf, RustBertError>;
}
Expand description

Required Methods

Provides the local path for a resource.

Returns
  • PathBuf pointing to the resource file
Example
use rust_bert::resources::{LocalResource, ResourceProvider};
use std::path::PathBuf;
let config_resource = LocalResource {
    local_path: PathBuf::from("path/to/config.json"),
};
let config_path = config_resource.get_local_path();

Implementors