From 9188fa6e13ea7facfab5fb6f55bf26444ec2c01e Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 29 Nov 2026 03:15:05 +0000 Subject: document: values read and written through a view any kind of document gives document::view: Read (the value at a path, plain, typed, a map's keys) and Write (a value written, one deleted), which Automerge's documents, writes in progress and documents as they were all are. The member registry, the users, access control's reads and rules, the topology, forgetting and bootstrap read and write through them, and name neither Automerge's ReadDoc and Transactable nor document::store, which is what an Automerge document can do beyond. How a swarm holding a store judges what a change writes is handed to the rules (rules::judge_seen), being its kind of document's to say. --- src/api/peers.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/api/peers.rs') diff --git a/src/api/peers.rs b/src/api/peers.rs index 30d1204..fc203f5 100644 --- a/src/api/peers.rs +++ b/src/api/peers.rs @@ -13,7 +13,7 @@ use tracing::warn; use super::store_status; use crate::document::replica::EpochRecord; -use crate::document::store; +use crate::document::view; use crate::locks::MutexExt; use crate::state::{AppState, HelloState, Incidents, Liveness}; use crate::swarm::peer::forgotten_path; @@ -326,7 +326,7 @@ pub(crate) async fn delete_peer( user, crate::document::signatures::Sign::Protocol, move |doc| { - store::write_path(doc, &forgotten_path(&peer_clone), &record)?; + view::write_path(doc, &forgotten_path(&peer_clone), &record)?; crate::swarm::members::unregister(doc, &peer_clone) }, ) -- cgit v1.3.1