aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-05 04:36:58 +0100
committertv <tv@krebsco.de>2026-11-05 04:36:58 +0100
commitc7226385f3765b2a72b7b4d95129fb20fec58d5c (patch)
tree6d6f6e1b6c58c16789551068f2daa8e19524abe2 /src/transport/mod.rs
parent39980623f81e9e75f142f55a35794bf7a53aa38b (diff)
push changes experiment
Diffstat (limited to 'src/transport/mod.rs')
-rw-r--r--src/transport/mod.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs
index 474e386..7e5d41b 100644
--- a/src/transport/mod.rs
+++ b/src/transport/mod.rs
@@ -743,6 +743,15 @@ pub(crate) enum SyncBody {
Message(#[serde(with = "crate::transport::wire::codec::sync_message")] SyncPayload),
/// An Automerge sync message, deflated (`compress`): a large one, which shrank.
Deflated(#[serde(with = "crate::transport::wire::codec::sync_message")] SyncPayload),
+ /// Changes passed on along a writer's tree as they are, with the sender's heads,
+ /// instead of an Automerge sync message (`AppState::push_changes`): where the sender
+ /// takes the message as delivered, it has everything the receiver has, and needs
+ /// none of the rest of one (`SyncSession::push`).
+ Changes {
+ #[serde(with = "crate::transport::wire::codec::change_hashes")]
+ heads: Vec<ChangeHash>,
+ changes: Vec<serde_bytes::ByteBuf>,
+ },
/// Instead of a message too large to send in one piece: fetch these changes as a
/// blob (`BlobId::Delta`), then sync on.
Delta(DeltaSpec),