pub trait Session {
    // Provided methods
    fn save_to(&self, _path: impl AsRef<Path>) -> Result<()> { ... }
    fn load_from(_path: impl AsRef<Path>) -> Result<Self>
       where Self: Sized { ... }
    fn try_clone(&self) -> Result<Self>
       where Self: Sized { ... }
}
Expand description

A session for a model.

Provided Methods§

source

fn save_to(&self, _path: impl AsRef<Path>) -> Result<()>

Save the session to the given path.

source

fn load_from(_path: impl AsRef<Path>) -> Result<Self>
where Self: Sized,

Load the session from the given path.

source

fn try_clone(&self) -> Result<Self>
where Self: Sized,

Try to clone the session.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Session for ()

source§

fn save_to(&self, _path: impl AsRef<Path>) -> Result<()>

source§

fn load_from(_path: impl AsRef<Path>) -> Result<()>

Implementors§