pub struct SessionRef {
pub session_id: String,
pub branch: String,
pub created_at: String,
pub path: String,
pub declares_issue: bool,
}Expand description
One session record that names this issue, and how strongly.
The two ways a session reaches an issue are not equally good, and the difference is the whole reason this carries a flag rather than being a bare id:
- the record’s own
issueskey.share/schemas/majordomus/session-recorddescribes it as “the issues it moved, by id — derived from the ledger’s own events for this episode; never authored”, so it is a canonical link that a machine worked out from events it can read. That isFieldProvenance::Derived. - the branch name. A record always declares the branch it was written on, and
crate::worktree::state::issue_ofreads an issue id out of one. It is a rule about a name and it can be wrong — a branch renamed, an id that is a prefix of another — so it isFieldProvenance::Inferred.
Reporting both under one provenance would make the weaker of them look like the stronger, which is the defect this whole module exists to prevent.
Fields§
§session_id: StringThe episode’s id.
branch: StringThe branch it was written on.
created_at: StringWhen the record says it was written.
path: StringRepository-relative path of the record.
declares_issue: boolTrue when the record’s own issues key names this issue: a canonical link, not a
guess about a branch name.
Trait Implementations§
Source§impl Clone for SessionRef
impl Clone for SessionRef
Source§fn clone(&self) -> SessionRef
fn clone(&self) -> SessionRef
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 SessionRef
impl Debug for SessionRef
Source§impl<'de> Deserialize<'de> for SessionRef
impl<'de> Deserialize<'de> for SessionRef
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 SessionRef
Source§impl JsonSchema for SessionRef
impl JsonSchema for SessionRef
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 SessionRef
impl PartialEq for SessionRef
Source§fn eq(&self, other: &SessionRef) -> bool
fn eq(&self, other: &SessionRef) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SessionRef
impl Serialize for SessionRef
impl StructuralPartialEq for SessionRef
Auto Trait Implementations§
impl Freeze for SessionRef
impl RefUnwindSafe for SessionRef
impl Send for SessionRef
impl Sync for SessionRef
impl Unpin for SessionRef
impl UnsafeUnpin for SessionRef
impl UnwindSafe for SessionRef
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.