pub async fn from_path<P: Into<PathBuf>>(path: P) -> Result<Self> {
        let p = path.into();
        info!(
            "Reading functions from store at '{}'",
            p.to_str().unwrap_or_default()
        );

        let _p = p.clone();
        let store: InnerStorageType = task::spawn_blocking(move || {
            let file = OpenOptions::new()
                .read(true)
                .write(true)
                .create(true)
                .open(&_p)
                .expect("Could not open/create data store");
            let buf_reader = BufReader::new(file);
            serde_json::from_reader(buf_reader).unwrap_or_default()
        })
        .await;
        Ok(JsonFaaSDataStore::with(store, p, true))
    }
///
/// Loads a store from the provided path.
///
Loads a store from the provided path.
Loads a store from the provided path .
pub async fn from_path<P: Into<PathBuf>>(path: P) -> Result<Self> {
        let p = path.into();
        info!(
            "Reading functions from store at '{}'",
            p.to_str().unwrap_or_default()
        );
        let _p = p.clone();
        let store: InnerStorageType = task::spawn_blocking(move || {
            let file = OpenOptions::new()
                .read(true)
                .write(true)
                .create(true)
                .open(&_p)
                .expect("Could not open/create data store");
            let buf_reader = BufReader::new(file);
            serde_json::from_reader(buf_reader).unwrap_or_default()
        })
        .await;
        Ok(JsonFaaSDataStore::with(store, p, true))
    }
pub async fn from_path < P : Into < PathBuf > > ( path : P ) -> Result < Self > { let p = path . into ( ) ; info ! ( " " p to_str ( ) unwrap_or_default ( ) ) ; let _p = p . clone ( ) ; let store : InnerStorageType = task :: spawn_blocking ( move | | { let file = OpenOptions :: new ( ) . read ( true ) . write ( true ) . create ( true ) . open ( & _p ) . expect ( " " ) ; let buf_reader = BufReader :: new ( file ) ; serde_json :: from_reader ( buf_reader ) . unwrap_or_default ( ) } ) . await ; Ok ( JsonFaaSDataStore :: with ( store , p , true ) ) }
Loads a store from the provided path.
Loads a store from the provided path .
path
P
path
P