MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / new_with_runtime

Method new_with_runtime

crates/engine/src/persistence.rs:125–137  ·  view source on GitHub ↗
(
        durability: impl spacetimedb_durability::Durability<TxData = Txdata> + 'static,
        disk_size: impl Fn() -> io::Result<SizeOnDisk> + Send + Sync + 'static,
        snapshots: Option<Snap

Source from the content-addressed store, hash-verified

123 }
124
125 pub fn new_with_runtime(
126 durability: impl spacetimedb_durability::Durability<TxData = Txdata> + 'static,
127 disk_size: impl Fn() -> io::Result<SizeOnDisk> + Send + Sync + 'static,
128 snapshots: Option<SnapshotWorker>,
129 runtime: Handle,
130 ) -> Self {
131 Self {
132 durability: Arc::new(durability),
133 disk_size: Arc::new(disk_size),
134 snapshots,
135 runtime,
136 }
137 }
138
139 /// If snapshots are enabled, get the [SnapshotRepo] they are stored in.
140 pub fn snapshot_repo(&self) -> Option<Arc<DynSnapshotRepo>> {

Callers

nothing calls this directly

Calls 1

newFunction · 0.50

Tested by

no test coverage detected