wire/answer/range.rs
1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4// Copyright (c) 2026 2youg1 and the sprawling contributors
5
6//! One window of a stored document version (`crates/wire/spec/Answer/Range.lean` ยง8-70).
7//!
8//! Read by the version rather than by the path, so a page three screens
9//! into a file a resident is rewriting goes on reading the version it
10//! opened. The window is the one the `documents` crate cut: `window.span`
11//! says where it really starts and ends, which is where the next request
12//! starts from.
13
14use documents::Window;
15use kernel::B3Hash;
16use serde::{Deserialize, Serialize};
17
18#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
19#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
20pub struct RangeAnswer {
21 pub version: B3Hash,
22 pub window: Window,
23}