mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-30 04:34:27 +02:00
15 lines
406 B
Rust
15 lines
406 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 {
|
|
fn get_statediff(&self, shortstatehash: u64) -> Result<StateDiff>;
|
|
fn save_statediff(&self, shortstatehash: u64, diff: StateDiff) -> Result<()>;
|
|
}
|