pub struct Runtime { /* private fields */ }Implementations§
source§impl Runtime
impl Runtime
pub fn new_from_model_path(model: PathBuf) -> Result<Self>
pub fn new_from_runtime_path(root: PathBuf) -> Result<Self>
pub fn open_dir<P>(&self, path: P) -> Result<Dir>where P: AsRef<Path>,
pub fn open_file<P>(&self, path: P) -> Result<File>where P: AsRef<Path>,
pub fn read_bytes<P>(&self, path: P) -> Result<Vec<u8>>where P: AsRef<Path>,
pub fn read_json<P, T>(&self, path: P) -> Result<T>where P: AsRef<Path>, T: DeserializeOwned,
pub fn load_model(&self) -> Result<Model>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnwindSafe for Runtime
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