mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01:24 +01:00
13 lines
354 B
Rust
13 lines
354 B
Rust
use super::CompressedStateEvent;
|
|
use crate::Result;
|
|
|
|
pub struct StateDiff {
|
|
parent: Option<u64>,
|
|
added: Vec<CompressedStateEvent>,
|
|
removed: Vec<CompressedStateEvent>,
|
|
}
|
|
|
|
pub trait Data {
|
|
fn get_statediff(&self, shortstatehash: u64) -> Result<StateDiff>;
|
|
fn save_statediff(&self, shortstatehash: u64, diff: StateDiff) -> Result<()>;
|
|
}
|