pub struct StructuredConflict {
pub id: String,
pub path: String,
pub symbol: Option<String>,
pub occurrence: u32,
pub merged_range: Option<ConflictRange>,
pub base: Option<ConflictSide>,
pub ours: Option<ConflictSide>,
pub theirs: Option<ConflictSide>,
pub status: i32,
pub resolution: Option<String>,
pub mode: Option<i32>,
pub resolver: Option<ConflictResolverAttribution>,
}Expand description
One independently addressable three-way conflict region, with lifecycle.
Fuses heddle’s ConflictRegionReport (region + three sides) and
ConflictResolutionReport (mode / resolution text / resolver) into a
single status-tagged message so clients never join two lists.
§Pin / addressability
id is a stable, content-addressed region identity — the same
addressability class DiscussionReference.id gained. It is referenceable
across states: a conflict discovered in one capture and resolved in
another is one conflict to a human, and the same id is the join key.
Heddle derives id as a deterministic BLAKE3 address over
(path, symbol, occurrence, base/ours/theirs hunk hashes) with domain
separator heddle-conflict-region-v1 (format conflict-<hex>). That
derivation is content-stable: unrelated line shifts and blob rewrites that
leave the three hunks unchanged preserve the id (heddle object-model test
stable_id_survives_unrelated_line_shifts_and_blob_rewrites).
Heddle follow-up (do not block this contract): producers that materialize
resolved status into a later state’s attachment MUST keep emitting that
same derived id rather than re-keying on state id or merged_range.
Resolution rows in the CLI report already key on conflict_id matching
the region id; attachment publishers must preserve that continuity.
Fields§
§id: StringStable conflict-region id (e.g. conflict-<hex>). NEVER display text:
clients resolve a label at render from path / symbol / current data.
path: StringRepository-relative path of the conflicted file.
symbol: Option<String>Stable semantic address when the source language can be parsed. Omit (do not send empty string) when unknown.
occurrence: u32Disambiguates byte-identical conflicts under the same path/symbol anchor.
merged_range: Option<ConflictRange>Range occupied by the rendered conflict-marker block in the merged view.
Zero-based, half-open [start_line, end_line).
base: Option<ConflictSide>Three-way sides. base / ours / theirs — NOT {left, right}. A three-way view is the whole reason a conflict is inspectable rather than a diff. Round-trips must carry cases where base differs from both ours and theirs.
ours: Option<ConflictSide>§theirs: Option<ConflictSide>§status: i32Lifecycle. Clients read status alone to answer “is this still open”.
resolution: Option<String>— Resolution fields: populated only when status is AUTO_RESOLVED or
RESOLVED; omit while OPEN. Maps heddle ConflictResolutionReport. —
Mode-as-string surface from heddle (ours / theirs / edit / auto).
Prefer mode for typed consumers; resolution is retained for report
parity and free-form edit summaries when mode == EDIT.
mode: Option<i32>§resolver: Option<ConflictResolverAttribution>Implementations§
Source§impl StructuredConflict
impl StructuredConflict
Sourcepub fn symbol(&self) -> &str
pub fn symbol(&self) -> &str
Returns the value of symbol, or the default value if symbol is unset.
Sourcepub fn status(&self) -> StructuredConflictStatus
pub fn status(&self) -> StructuredConflictStatus
Returns the enum value of status, or the default if the field is set to an invalid enum value.
Sourcepub fn set_status(&mut self, value: StructuredConflictStatus)
pub fn set_status(&mut self, value: StructuredConflictStatus)
Sets status to the provided enum value.
Sourcepub fn resolution(&self) -> &str
pub fn resolution(&self) -> &str
Returns the value of resolution, or the default value if resolution is unset.
Sourcepub fn mode(&self) -> ConflictResolutionMode
pub fn mode(&self) -> ConflictResolutionMode
Returns the enum value of mode, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_mode(&mut self, value: ConflictResolutionMode)
pub fn set_mode(&mut self, value: ConflictResolutionMode)
Sets mode to the provided enum value.
Trait Implementations§
Source§impl Clone for StructuredConflict
impl Clone for StructuredConflict
Source§fn clone(&self) -> StructuredConflict
fn clone(&self) -> StructuredConflict
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StructuredConflict
impl Debug for StructuredConflict
Source§impl Default for StructuredConflict
impl Default for StructuredConflict
impl Eq for StructuredConflict
Source§impl Hash for StructuredConflict
impl Hash for StructuredConflict
Source§impl Message for StructuredConflict
impl Message for StructuredConflict
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.