pub struct CloseReport {
pub episode: EpisodeId,
pub outcome: CloseOutcome,
pub record: String,
pub duplicates: Vec<String>,
pub diagnostic: String,
}Expand description
What a close said: the episode, the outcome, the canonical record, any historical duplicates of it, and a line a person can act on.
use majordomus_cli::session::{CloseReport, Episode, EpisodeId, Outcome, SessionStore};
use std::path::Path;
let dir = tempfile::tempdir().unwrap();
let store = SessionStore::writable(dir.path());
let id = EpisodeId::parse("s-20260910205542-e2a6").unwrap();
let episode = Episode::opening(id.clone(), Path::new("/r"))
.opened_at("2026-09-10T20:55:42Z", "master", "9f3a2a0", 1_000);
let report: CloseReport = store
.close(&episode, Outcome::Closed, || format!("---\nsession_id: {}\n---\n", id))
.expect("a close");
assert_eq!(report.episode, id);
assert!(report.duplicates.is_empty(), "a clean store holds no damage to report");Fields§
§episode: EpisodeIdThe episode.
outcome: CloseOutcomeWhat happened.
record: StringThe canonical record of this episode: the one this call wrote, or the one that already stood. Repository-relative. Empty when nothing was written and nothing was found.
duplicates: Vec<String>Historical records of this episode beyond the canonical one, repository-relative and in canonical order. Non-empty means the store already holds damage of the kind this closer exists to prevent, and the caller is told rather than left to find it.
diagnostic: StringA line a person can act on, when there is one to say.
Trait Implementations§
Source§impl Clone for CloseReport
impl Clone for CloseReport
Source§fn clone(&self) -> CloseReport
fn clone(&self) -> CloseReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CloseReport
impl Debug for CloseReport
Source§impl<'de> Deserialize<'de> for CloseReport
impl<'de> Deserialize<'de> for CloseReport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CloseReport
Source§impl JsonSchema for CloseReport
impl JsonSchema for CloseReport
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for CloseReport
impl PartialEq for CloseReport
Source§fn eq(&self, other: &CloseReport) -> bool
fn eq(&self, other: &CloseReport) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CloseReport
impl Serialize for CloseReport
impl StructuralPartialEq for CloseReport
Auto Trait Implementations§
impl Freeze for CloseReport
impl RefUnwindSafe for CloseReport
impl Send for CloseReport
impl Sync for CloseReport
impl Unpin for CloseReport
impl UnsafeUnpin for CloseReport
impl UnwindSafe for CloseReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.