spacetimedb-paths 1.3.0

The spacetimedb directory structure, represented as a type hierarchy
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::server::ServerDataDir;
use crate::utils::path_type;

pub trait StandaloneDataDirExt: AsRef<std::path::Path> {
    fn program_bytes(&self) -> ProgramBytesDir {
        ProgramBytesDir(self.as_ref().join("program-bytes"))
    }
    fn control_db(&self) -> ControlDbDir {
        ControlDbDir(self.as_ref().join("control-db"))
    }
}

impl StandaloneDataDirExt for ServerDataDir {}

path_type!(ProgramBytesDir: dir);
path_type!(ControlDbDir: dir);