/// Reads state from the specified named snapshot or the specified path
/// TODO: Add associated data.
Reads state from the specified named snapshot or the specified path
TODO: Add associated data.
Reads state from the specified named snapshot or the specified path TODO : Add associated data .
pub fn read_from_snapshot(name: Option<&str>, path: Option<&Path>, key: Key) -> crate::Result<Self> {
        let state = match path {
            Some(p) => read_from(p, &key, &[])?,
            None => read_from(&snapshot::files::get_path(name)?, &key, &[])?,
        };
        let data = SnapshotState::deserialize(state);
        Ok(Self::new(data))
    }
pub fn read_from_snapshot ( name : Option < & str > , path : Option < & Path > , key : Key ) -> crate :: Result < Self > { let state = match path { Some ( p ) => read_from ( p , & key , & [ ] ) ? , None => read_from ( & snapshot :: files :: get_path ( name ) ? , & key , & [ ] ) ? , } ; let data = SnapshotState :: deserialize ( state ) ; Ok ( Self :: new ( data ) ) }
Reads state from the specified named snapshot or the specified path
TODO: Add associated data.
Reads state from the specified named snapshot or the specified path TODO : Add associated data .
name
Option<&str>
path
Option<&Path>
key
Key