muse_code_sdk/msp/view/item_damaged_range.rs
1// @generated from the MSP stable schema and protocol sources; do not edit by hand.
2
3use serde::Deserialize;
4use serde::Serialize;
5
6/// `damagedRange`: what one damaged range of the session log cost. The reader
7/// finds the range in the log bytes; no log record is written for it, so every
8/// member is derived from the readable records around it.
9#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
10#[serde(rename_all = "camelCase")]
11#[non_exhaustive]
12pub struct DamagedRange {
13 /// Physical log lines in the range that are not a readable record.
14 pub unreadable_lines: u64,
15 /// Records the log proves missing (session-stream sequence numbers no
16 /// readable record or unreadable line accounts for).
17 pub missing_records: u64,
18 /// RFC3339 `recordedAt` of the last readable record before the range;
19 /// absent when the range starts the log.
20 #[serde(skip_serializing_if = "Option::is_none")]
21 pub readable_before_at: Option<String>,
22 /// RFC3339 `recordedAt` of the first readable record after the range;
23 /// always present, since a range is read past only when readable records
24 /// follow it.
25 pub readable_after_at: String,
26 /// The last finished turn before the first damaged range, when one exists:
27 /// the safe `session/fork` cut.
28 #[serde(skip_serializing_if = "Option::is_none")]
29 pub last_good_turn_id: Option<String>,
30}