mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-06 18:06:11 +02:00
15 lines
419 B
Rust
15 lines
419 B
Rust
use std::collections::HashSet;
|
|
|
|
use super::CompressedStateEvent;
|
|
use crate::Result;
|
|
|
|
pub struct StateDiff {
|
|
pub parent: Option<u64>,
|
|
pub added: HashSet<CompressedStateEvent>,
|
|
pub removed: HashSet<CompressedStateEvent>,
|
|
}
|
|
|
|
pub trait Data: Send + Sync {
|
|
fn get_statediff(&self, shortstatehash: u64) -> Result<StateDiff>;
|
|
fn save_statediff(&self, shortstatehash: u64, diff: StateDiff) -> Result<()>;
|
|
}
|